It would be nice if there were such a thing as conditional includes.
For example:

        depend:: -include dependencies

Then in the case where the dependencies file has an error, the dependencies
file would not be included when doing 'make depend'.

We structure our Makefiles as follows:

        depend::
                @makedepend -o dependencies ....

        -include dependencies

However, if someone deletes a file that is used as a dependency in the
dependencies file, make fails with an error.  Any attempt to do 'make depend'
fails with the same error -- still including the dependencies file.  The only
recourse is to delete the dependencies file and then do 'make depend'.  This
is difficult to communicate to a large development staff, and breaks automated
build procedures.

IMO, the following __might__ solve such a problem: 

        depend::
                @makedepend -o dependencies ....

        $(filter-out depend, $(COMMON_TARGETS)):: -include dependencies

which would only include the dependencies file when NOT invoked as
'make depend'. 

If there is a better way, please let me know.

Reid

-- 
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