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 08:56:02 -0800

At 05:23 PM 1/28/2003 +0100, Der Herr Hofrat wrote:

I still think it is a shell problem not make

rtl11:~ $ make FOO=" "
origin of FOO is: command line
FOO is empty
rtl11:~ $ make FOO="\ "
origin of FOO is: command line
FOO is not empty

and the value of FOO is one blank in the second case. So I guess it IS the
shells way of expanding things thats causing the problem.

hofrat

I don't think so. My shell script example was intended to show that the SHELL is not preventing a simple shell script from seeing the space that make is NOT SEEING. make is parsing the command line variables, not as variables per se, but as parameters - this is where the problem comes in.

You give a good example above. My suspicion is that this seemingly inconsistent behavior (as viewed compared with environmental variables and with other programs which accept command line parameters), is actually sort of understandable if you think of command-line variables as essentially the same as makefile variables: make never sees any leading space in makefile variable assignments. I think that is what is happening here. But I still think it is unfortunately odd: methinks it would be better for make to behave the same when making assignments from command line or from the environment.


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





reply via email to

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