[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

command line variables not exported to $(shell)

From: Manoj Srivastava
Subject: command line variables not exported to $(shell)
Date: Sun, 23 Oct 2005 15:21:14 -0500
User-agent: Microsoft Gnus Express, Build 5.110004 (0.4)


            [Please retain the CC to address@hidden
             so that the Debian Bug Tracking system can record your

        This was reported by a debian user. While I am not sure this
 is a bug, this should perhaps be documented, if not.


 '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.

"Mr. Watson, come here, I want you."  -- Alexander Graham Bell
Manoj Srivastava     <address@hidden>    <http://www.golden-gryphon.com/>
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

reply via email to

[Prev in Thread] Current Thread [Next in Thread]