Hi Mark,
On 11/3/2009 1:54 PM, Mark Galeck (CW) wrote:
Hello, I see the following recommendation for a "subsystem" recursive
make in the gnu make manual:
subsystem:
$(MAKE) -C subdir
Well, I must not be understanding something, because this does not
make (no pun) sense to me...
The problem I have, is that the "subsystem" target as above, will
always be remaked, if only to execute make recursively and find out in
fact, that everything was up to date in that subdirectory. Then of
course, everything up above, depending on the subsystem target, will
also have to be remaked. In other words, even if you don't change
anything, make will still take time to remake some things. Clearly
this is against the spirit of make.
What you seem to be concerned about is that Make will always recurse
down into subdir, even if nothing needs to be made in subdir. This is
true but unavoidable, because make has to evaluate the state of
subdir/Makefile in order to determine if anything has to be made in that
directory. This is the nature of recursive make. If you don't want a
recursive make, then just put all of your rules in the top-level Makefile.
That said, if nothing needs to be remade, the effect of recursive make
is to simply run make several times - one for each sub-make - each of
which do nothing more than determine that nothing needs to be done.
Regards,
John
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make