bug-make
[Top][All Lists]
Advanced

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

Re: problems with $(eval include...)


From: Paul D. Smith
Subject: Re: problems with $(eval include...)
Date: Mon, 30 Jun 2003 09:15:51 -0400

%% "Peter A. Kerzum" <address@hidden> writes:

  pak> Yeah, Fabio's way seem quite clean and pretty. I agree that eval
  pak> should support include.

$(eval ...) does support include.

What Fabio wants to do is declare new prerequisites inside of a
command script.  That may not be possible in a reliable way.  Make
proceeds in two very distinct phases: in the first phase make reads in
all the makefiles and constructs an internal dependency graph, and in
the second phase make walks that dependency graph and rebuilds target
that it deems out of date.

Make was not written in a way that expects the dependency graph to be
modified during the second phase: until $(eval ...) that was simply
impossible.

I'm not prepared at this time to say that it _should_ be possible.  I
won't be prepared to decide that until after I understand the reasons
why it doesn't work now.  There are all kinds of potential problems; for
example it often happens that more than one prerequisite depends on the
same target: what if the target that you're modifying (by adding
prerequisites) is already built?  Should make somehow figure that out
and reconsider the target?  If not, won't that lead to lots of confusion
on the part of the user?

If I decide that this behavior is not valid then I'll add some code to
GNU make disallowing it with an error, so that we won't get core dumps
in GNU make any longer.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist




reply via email to

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