tech-userlevel archive

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

another make(1) .for loop problem



Hello,

on a 5.99.5 system with make(1) built from todays soures, the attached
makefile fails:

$ make
testing VAR0: not defined
*** Error code 1
[...]

With older make(1) this used to work fine:

$ make.old
testing VAR0: ok
testing VAR1: ok

Am I abusing make(1) or is this a bug?


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
VAR0 ?= x
VAR1 ?= y
VARS = VAR0 VAR1
test:
.for var in $(VARS)
        @echo -n "testing $(var): "
.  if empty($(var))
        @echo 'empty'
        @false
.  endif
.  ifndef $(var)
        @echo 'not defined'
        @false
.  endif
        @echo 'ok'
.endfor


Home | Main Index | Thread Index | Old Index