help-make
[Top][All Lists]
Advanced

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

Re: inconsistency of 'emptiness'?


From: gk
Subject: Re: inconsistency of 'emptiness'?
Date: Tue, 28 Jan 2003 11:03:12 -0800

At 10:52 AM 1/28/2003 -0800, gk wrote:
At 05:23 PM 1/28/2003 +0100, Der Herr Hofrat wrote:
I still think it is a shell problem not make


Here is some more insight.
Apparently what is happening is this:
1. the shell interprets the command-line as it always does
2. make EVALUATES substrings after the equals sign IN THE SHELL AGAIN, before making the makefile variable assignment.

Not quite.
Mystery solved: make evalutes substring after the command-line '=' in the MAKEFILE context, NOT in the shell.
This explains the loss of leading white space and the 'double evaluation'.
Example.

address@hidden junk]$ make FOO=' $SHELL'
origin of FOO is: command line
FOO is not empty: FOO=HELL
address@hidden junk]$ make FOO=' $$SHELL'
origin of FOO is: command line
FOO is not empty: FOO=/bin/sh
address@hidden junk]$



- Greg Keraunen
http://www.xmake.org
http://www.xmlmake.com





reply via email to

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