Yes, I made that change and it worked, even before I got your message.
Thank you for the clarification.
- Jim
--
Jim Campbell
[EMAIL PROTECTED]
716/424-3560, x206 (direct)
716/424-4554, x206 (switchboard)
"Paul D. Smith"
<[EMAIL PROTECTED]> To:
[EMAIL PROTECTED]
Sent by: "Paul D. cc: [EMAIL PROTECTED]
Smith" Subject: Re: Macro evaluation order
in 3.79.1
<pausmith@nortelnet
works.com>
09/11/00 02:05 PM
Please respond to
"Paul D. Smith"
%% [EMAIL PROTECTED] writes:
jc> Consider the following Makefile:
jc> clean: GOAL= clean
jc> ifneq ($(GOAL),clean)
jc> include foo.mk
jc> endif
jc> clean:
jc> echo $(GOAL)
jc> If I type make clean, I would expect the Makefile to skip inclusion
of
jc> foo.mk.
No.
You've assigned the variable GOAL with a target-specific variable. That
means that the variable has that value _within the context of that
target_. That is, when make is actually in the process of invoking that
target's commands.
The if-statement is evaluated while reading the makefile, long before
make even starts to build any targets, much less the clean target. So,
the value of GOAL is empty.
Check the section on target-specific variables more carefully; this is
stated explicitly there. Also helpful may be the chapter on `How `make'
Reads a Makefile'.
You want to use the builtin variable MAKECMDGOALS, and test that to see
if it's "clean".
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org
http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad
Scientist