[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question regarding alias expansion..
From: |
Rick Flower |
Subject: |
Re: Question regarding alias expansion.. |
Date: |
Mon, 4 Aug 2008 15:31:53 -0700 (PDT) |
User-agent: |
SquirrelMail/1.4.10a |
On Mon, August 4, 2008 2:54 pm, Sam Ravnborg wrote:
> I played with this sample - replacing include with $(warning ...)
> and it just works.
>
> Could you please post a real example that fails
> so we can try it out.
Sure.. No problems.. Very easy to repro for me with the following.. Invoke
make using 'make release' and you *should* see :
Makefile:10: *** Mode WAS defined properly!. Stop.
However, that is not the case w/ Make 3.81.. Below are the two Makefiles
to try this out with :
Contents of Makefile:
===================================
foo = foo
bar = bar
include Makefile-aliases.mak
ifndef mode
mode = bar
$(error mode NOT defined properly!)
else
$(error Mode WAS defined properly!)
endif
===================================
Contents of Makefile-aliases.mak
===================================
.PHONY: release
release: all
ifneq ($(filter release,$(MAKECMDGOALS)),)
mode = foo
endif
===================================
Just keep in mind that the conditional above (ifndef) controls
reading a secondary Makefile in my real probkem scenario.. It appears
that it eventually sets 'mode=bar' but not in the proper time frame
for the conditionals above.. You can see this below by the output from
'make -p release | grep mode' :
Makefile:8: *** mode NOT defined properly!. Stop.
mode = bar
mode = foo
It doesn't seem to matter if I used variables w/ := vs. = either.. If
there's something obvious I've missed, please let me know... Thanks!
- Question regarding alias expansion.., Rick Flower, 2008/08/04
- Re: Question regarding alias expansion.., Sam Ravnborg, 2008/08/04
- Re: Question regarding alias expansion.., Rick Flower, 2008/08/04
- Re: Question regarding alias expansion.., Rick Flower, 2008/08/04
- Re: Question regarding alias expansion.., Sam Ravnborg, 2008/08/04
- Re: Question regarding alias expansion..,
Rick Flower <=
- Re: Question regarding alias expansion.., Paul Smith, 2008/08/04
- Re: Question regarding alias expansion.., Rick Flower, 2008/08/04
- RE: Question regarding alias expansion.., Rinehart, Raleigh, 2008/08/05
- Re: Question regarding alias expansion.., Paul Smith, 2008/08/04
- Re: Question regarding alias expansion.., Rick Flower, 2008/08/04
Re: Question regarding alias expansion.., Paul Smith, 2008/08/04