%% "Robert P. J. Day" <[EMAIL PROTECTED]> writes:
rpjd> and i can't add
rpjd> ${SUBDIRS}: pre-populate
rpjd> since that dependency should *only* take effect when i'm
rpjd> invoking the makefile with the "populate" target, and no others.
Hm. Well, an answer to what your asking for would be:
POPULATE_PREREQ :=
ifneq ($(filter populate,$(MAKECMDGOALS)),)
POPULATE_PREREQ := pre-populate
endif
${SUBDIRS}: ${POPULATE_PREREQ}
Or, of course, you could add an extra level of recursion, like this:
populate: pre-populate
$(MAKE) ${SUBDIRS}
or something.
If you always want the populate/pre-populate step to be run once at the
beginning, then probably the right answer is to just arrange to have it
run EVERY time, but include enough smarts (in terms of prerequisites,
fake targets, etc.) in the makefile so that the second and subsequent
runs don't actually invoke those commands.
Then you can go back to the simple solution.
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> 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
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make