This is the mail archive of the
automake@gnu.org
mailing list for the automake project.
Re: Conditional append
Hi.
On Fri, Jan 07, 2005 at 12:20:57PM -0800, Shaun Jackman wrote:
> Is there any reason why the append operator shouldn't treat an
> undefined variable as empty?
Safety, I guess.
make handles variables differently from normal imperative languages,
so you can do this in your makefile:
a=$b c
b=d
all:
echo $a
Automake, OTOH, traces the variable assignments to the variables in the
normal order. If a variable is undefined, the user might meant to define
it later, which is not possible in Automake. So Automake is more
restrictive, to prevent confusion.
Alexandre, am I right?
Regards,
Stepan Kasal