[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: '--' inserted into MAKEFLAGS
From: |
gk |
Subject: |
Re: '--' inserted into MAKEFLAGS |
Date: |
Thu, 26 Jun 2003 14:58:17 -0700 |
At 05:17 PM 6/26/2003 -0400, you wrote:
I think it might be necessary. What if you had:
$ make -- -FOO=bar
I think without the -- this would cause problems.
I don't know why anyone would want to begin a variable name with '-' but
interesting thought...
However it appears to be broken: it DOES cause problems because make does
not insert the '--' in that case.
Normally, by default, overrides are passed to submakes, but this example,
they aren't. Seems to be a bug. I tested passing option to submake: $(MAKE)
-k baz, with the same results.
# Makefile
$(warning MAKEFLAGS=$(MAKEFLAGS))
bar:
@#$(warning MAKEFLAGS=$(MAKEFLAGS))
$(MAKE) baz
baz:
@#$(warning MAKEFLAGS=$(MAKEFLAGS))
#eof
address@hidden junk]$ make -k FOO=foo bar
Makefile:3: MAKEFLAGS=k
Makefile:5: MAKEFLAGS=k -- FOO=foo
make baz
make[1]: Entering directory `/usr/local/apache/htdocs/common/test/junk'
Makefile:3: MAKEFLAGS=wk
Makefile:8: MAKEFLAGS=wk -- FOO=foo
make[1]: Leaving directory `/usr/local/apache/htdocs/common/test/junk'
address@hidden junk]$ make -- -FOO=foo bar
Makefile:3: MAKEFLAGS=
Makefile:5: MAKEFLAGS=-FOO=foo
make baz
make[1]: Entering directory `/usr/local/apache/htdocs/common/test/junk'
Makefile:3: MAKEFLAGS=w
Makefile:8: MAKEFLAGS=w
make[1]: Leaving directory `/usr/local/apache/htdocs/common/test/junk'
address@hidden junk]$
- Greg Keraunen
http://www.xmake.org