[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
inconsistency of 'emptiness'?
From: |
gk |
Subject: |
inconsistency of 'emptiness'? |
Date: |
Thu, 23 Jan 2003 15:23:25 -0800 |
I have noticed inconsistent behavior when a variable contains a single space:
* If the variable comes from the command-line, make thinks it is empty
* If the variable is set in the makefile, make knows it is not empty
# Makefile
.PHONY: test
i:=
ifdef internal
FOO:=$i #
endif
list:=hi there
# if not empty, we clear the list
ifneq ($(FOO),)
list:=
endif
test:
@echo $(list)
@echo FOO: origin=$(origin FOO)
#eof
address@hidden junk]$ make
hi there
FOO: origin=undefined
address@hidden junk]$ make FOO=' '
hi there
FOO: origin=command line
address@hidden junk]$ make internal=1
FOO: origin=file
address@hidden junk]$
Does this make sense? Is it documented? Is it a bug?
- Greg Keraunen
http://www.xmake.org
http://www.xmlmake.com
- inconsistency of 'emptiness'?,
gk <=
- Re: inconsistency of 'emptiness'?, gk, 2003/01/23
- Re: inconsistency of 'emptiness'?, Der Herr Hofrat, 2003/01/28
- Re: inconsistency of 'emptiness'?, gk, 2003/01/28
- Re: inconsistency of 'emptiness'?, Der Herr Hofrat, 2003/01/28
- Re: inconsistency of 'emptiness'?, gk, 2003/01/28
- Re: inconsistency of 'emptiness'?, gk, 2003/01/28
- Re: inconsistency of 'emptiness'?, gk, 2003/01/28
Re: inconsistency of 'emptiness'?, gk, 2003/01/28