I have just discovered your discussion of ${MAKECMDGOALS} and its use to
avoid creating the dependency files for a "make clean".  I am sorry to have
bothered you.

Jess Barmatz

----- Forwarded by Jess Barmatz/Orincon on 04/23/2002 03:06 PM -----
                                                                                       
                       
                    Jess Barmatz                                                       
                       
                                         To:     [EMAIL PROTECTED]                      
                       
                    04/23/2002           cc:                                           
                       
                    02:58 PM             Subject:     Gnu Make Dependency Bug?         
                       
                                                                                       
                       
                                                                                       
                       



I believe that the enclosed makefile illustrates an unfortunate feature of
gnu make.

Note first that the makefile constructs (header) file dependencies just as
documented in http://www.gnu.org/manual/make/html_chapter/make_4.html.

The problem is that gnu make examines all dependencies and tries to satisfy
them before executing the selected target. If the target is clean, which
deletes the dependency files, gnu make first tries to create them.  Not
only does this waste time, but it may be impossible if,  for example, a
local *.h file has been removed or renamed.  That causes the "make" to
abort without completing the "make clean".

What also seems particularly unfortunate is that "make clean" first creates
all the dependency files and then deletes them!

So far as I can determine from the documentation, there is no way to work
around this, e.g., to determine the target and suppress the "-include" line
that includes the dependency files.

Do you know of another solution?

Thank you,
Jess Barmatz
ORINCON CORP.





_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to