At 10:52 AM 1/28/2003 -0800, gk wrote:
It looks like der.herr was right after all!At 05:23 PM 1/28/2003 +0100, Der Herr Hofrat wrote:I still think it is a shell problem not make
The 'mysterious loss' of backslash, was the fault of my makefile: command rules interpret the '\ ' which make received.
Here is a modified version with output below.
There does not appear to be any bug except perhaps the lack of documentation that any leading space in command-line variable assignments is lost, just as makefile variables behave.
# Makefile
.PHONY: test
# test if FOO is empty
ifeq ($(FOO),)
empty:=FOO is empty
else
empty:=FOO is not empty
endif
test:
@echo origin of FOO is: $(origin FOO)
@echo 'previous test produced misleading output:'
@echo FOO=$(FOO)#
@echo 'the correct output is:'
@echo FOO='$(FOO)'\#
@echo $(empty)
#eof
[greg@p3 junk]$ make FOO=' \'
origin of FOO is: command line
previous test produced misleading output:
FOO=#
the correct output is:
FOO=\#
FOO is not empty
[greg@p3 junk]$ make FOO='\ '
origin of FOO is: command line
previous test produced misleading output:
FOO= #
the correct output is:
FOO=\ #
FOO is not empty
- Greg Keraunen
http://www.xmake.org
http://www.xmlmake.com
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make
