On Wed, 26 Jan 2005, Paul D. Smith wrote:

> %% "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}

just an observation that this second suggestion won't work since my
makefile takes advantage of getting the phony action target ("clean",
"configure", etc.) from ${MAKECMDGOALS}, and invoking another make at
this point would overwrite those values.

anyway, i have enough ideas to make this work, one way or another.
thanks for the suggestions.

rday



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to