On Fri, 28 Jan 2005, Paul D. Smith wrote:
> %% "Robert P. J. Day" <[EMAIL PROTECTED]> writes:
>
> rpjd> ${SUBDIRS}:
> rpjd> @echo "My target is [EMAIL PROTECTED]"
> rpjd> @echo "My makefile variable contains [EMAIL PROTECTED]"
> rpjd> ifneq "[EMAIL PROTECTED]" ""
> rpjd> @echo "Yup, that variable is set."
> rpjd> endif
>
> This cannot work.
>
> Make preprocessor statements are evaluated when the makefile is read in,
> just like the C/C++ preprocessor.
>
> The contents of rules, and in particular automatic variables like $@,
> are only set when the rule is invoked.
i suspected as much, and read the section "When Variables are
Expanded" in the 3rd edition of O'Reilly's make book, but it didn't
shed a lot of light. so, really, i did try to RTFM first. :-)
thanks.
rday
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make