Hi forks, Make's empty() does not catch outer .for iterators.
> % uname -a > NetBSD myhost 10.1 NetBSD 10.1 (GENERIC) #0: Mon Dec 16 13:08:11 UTC 2024 > [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC amd64 > > % cat Makefile.empty > .for i in yes no > . if !empty(i:M[Yy][Ee][Ss]) > output+= yes > . endif > .endfor > > all: > @echo ${output} > > % make -f Makefile.empty > Debug output says: > % make -dA -f Makefile.empty > : > : > CondParser_Eval: !empty(i:M[Yy][Ee][Ss]) > Var_Parse: y(i:M[Yy][Ee][Ss]) (eval) > Evaluating modifier ${i:M...} on value "" (eval, undefined) > Pattern for ':M' is "[Yy][Ee][Ss]" > ModifyWords: split "" into 1 word > Result of ${i:M[Yy][Ee][Ss]} is "" (eval, undefined) > : > : i is undefined. defined() and .ifdef do the same. Is this behavior intentional? -- Kogule, Ryo
