[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gnu Make Dependency Bug?

From: jess
Subject: Gnu Make Dependency Bug?
Date: Tue, 23 Apr 2002 14:58:08 -0700

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

(See attached file: makefile)

Attachment: makefile
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]