help-make
[Top][All Lists]
Advanced

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

Re: executing a rule prior to any targets?


From: Paul D. Smith
Subject: Re: executing a rule prior to any targets?
Date: Sun, 20 Oct 2002 21:28:29 -0400

I like the idea of non-recursive make.  Unfortunately, it is not always
as easy to create non-recursive makefiles in practice as Miller's paper
makes it seem.  There are often special situations in various makefiles
which are very difficult to handle without using recursion; remember
make has no real "scoping" capabilities for variable values, etc.  If
your project is very simple: just building .c's in .o's into .a's and
executables, you can do it without too much hassle.  If, as has often
been the case in projects I'm involved in, you're building lots of
different kinds of source into everything from databases, to compiling
internal languages into .c/.h files and building those, etc. it can get
more complex.

Non-recursive makes took a very large step closer to reality with the
introduction of target-specific variables into GNU make, and I expect
that the new $(eval ...) function in GNU make 3.80 will help even more,
as will the order-only prerequisite feature.

Even so, there will likely be situations where recursion is the only way
out, when the rubber really hits the road in a complex environment.

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