bug-make
[Top][All Lists]
Advanced

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

[bug #102] Make prints an incorrect error for missing includes


From: Paul D. Smith
Subject: [bug #102] Make prints an incorrect error for missing includes
Date: Wed, 30 Aug 2006 14:21:46 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.5) Gecko/20060731 Ubuntu/dapper-security Firefox/1.5.0.5

Follow-up Comment #5, bug #102 (project make):

Re: Comment #3:
> All is well. So why the error?

Yes, this is exactly the bug.  The problem is that make generates the error
before it realizes that it could rebuild the target.  I've tried on a couple
of occassions to fix this by delaying the error message until make is sure
there's no way to rebuild the target, but the behavior of make in these areas
is complex enough that it's not so simple and my attempts failed.

Re: Comment #4:
> a bona fide bug in include resolution.

No, it's not a bug.  This is expected behavior.  The way GNU make works is it
first reads ALL the makefiles, THEN it tries to rebuild ALL the makefiles that
don't exist or are not up to date, THEN it re-execs.  It does not rebuild one
makefile, re-exec, rebuild the next makefile, re-exec, etc. which is the
behavior it would need to have in order for your environment to work
properly.

If you want that behavior you can get it: one way is to move the include
$(SOMEDIR)/Defs.mk line into Master.mk itself; that way it won't be visible
until after Master.mk is built.

If you don't want to do that due to ordering or other issues, you can include
a trigger in Master.mk that enables the rest of the includes; for example your
top-level makefile could be:

include Master.mk

ifdef SOMEDIR
include $(SOMEDIR)/Defs.mk
endif

ifdef SOME_OTHER_DIR
include $(SOME_OTHER_DIR)/Rules.mk
endif

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?102>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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