I used the MAKEGOALCMDS variable to accomplish this.

Thanks

Reid

 > X-Authentication-Warning: lemming.engeast: psmith set sender to 
 >[EMAIL PROTECTED] using -f
 > MIME-Version: 1.0
 > Content-Type: text/plain; charset=us-ascii
 > Content-Transfer-Encoding: 7bit
 > Date: Tue, 15 Aug 2000 03:16:54 -0400 (EDT)
 > Cc: [EMAIL PROTECTED]
 > References: <[EMAIL PROTECTED]>
 > X-Mailer: VM 6.75 under Emacs 20.6.1
 > From: "Paul D. Smith" <[EMAIL PROTECTED]>
 > Reply-To: "Paul D. Smith" <[EMAIL PROTECTED]>
 > Organization: GNU's Not Unix!
 > 
 > %% Reid Madsen <[EMAIL PROTECTED]> writes:
 > 
 >   rm> It would be nice if there were such a thing as conditional includes.
 >   rm> For example:
 > 
 >   rm>        depend:: -include dependencies
 > 
 >   rm> Then in the case where the dependencies file has an error, the
 >   rm> dependencies file would not be included when doing 'make depend'.
 > 
 > I don't understand the exact semantics you mean this syntax to provide.
 > 
 >   rm> We structure our Makefiles as follows:
 > 
 >   rm>        depend::
 >   rm>                @makedepend -o dependencies ....
 > 
 >   rm>        -include dependencies
 > 
 >   rm> However, if someone deletes a file that is used as a dependency in
 >   rm> the dependencies file, make fails with an error.  Any attempt to
 >   rm> do 'make depend' fails with the same error -- still including the
 >   rm> dependencies file.  The only recourse is to delete the
 >   rm> dependencies file and then do 'make depend'.  This is difficult to
 >   rm> communicate to a large development staff, and breaks automated
 >   rm> build procedures.
 > 
 > If you don't need the dependencies file to be included when running
 > "make depend" you can test the MAKECMDGOALS variable to see what targets
 > are being made, and not do the include if it's "depend".  See the GNU
 > make manual for info on this variable; you need GNU make 3.76 or
 > better.  I believe the manual has an example of doing almost exactly
 > this, except for the "clean" rule.
 > 
 > Also, for an all-around better way of handling automatically generated
 > dependencies, see my web page below.
 > 
 > -- 
 > -------------------------------------------------------------------------------
 >  Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 >  http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 >  "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
 > 


-- 
Reid Madsen                             [EMAIL PROTECTED]                      
Senior Member, Tech. Staff              (972) 536-3261 (Desk)
I2 Technologies                         (214) 850-9613 (Cellular)
--
Lance Armstrong wins Tour de France by 6:02
For more info: www.letour.com/2000/us

Reply via email to