Sat 31 Dec 2005 03:10:49 PM UTC, original submission:
This was reported by a debian user. While I am not sure this is a bug, this should perhaps be documented, if not.
manoj
'make' does not export command-line-derived variables to subshells launched via $(shell):
,----[ makefile ]
| all:
| @echo FOO is $$FOO,$(shell echo $(FOO)),$(shell echo $$FOO)
`----
If I run it with 'FOO=1 make', it prints:
,----
| FOO is 1,1,1
`----
...as I expected. But if I run it with 'make FOO=1' or 'make FOO:=1', it prints:
,----
| FOO is 1,1,
`----
which I certainly did not expect. Passing FOO separately from the environment and the command line, 'FOO=1 make FOO=2':
,----
| FOO is 2,2,1
`----
This might not be a bug, but I can't find it documentated.
|