help-make
[Top][All Lists]
Advanced

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

eval within ifeq..endif


From: Jason Lunz
Subject: eval within ifeq..endif
Date: Mon, 1 May 2006 19:49:17 +0000 (UTC)
User-agent: slrn/0.9.8.1 (Debian)

I'm having trouble taking a Makefile that uses $(eval) and wrapping it
with a global ifeq/else/endif as described at
http://make.paulandlesley.org/multi-arch.html. Here's a simple Makefile
that exhibits the problem:

        $ cat > Makefile
        ifneq (foo,bar)
        $(eval a=b)
        endif

        foo:
                @echo $(a)

        $ make
        Makefile:2: *** missing `endif'.  Stop.

However, if I comment out the "ifneq/endif" lines, the above makefile
prints "b" as it should.

This only occurs with make 3.80 (I'm using debian stable). It works
properly with make 3.81. But if possible, I'd like to avoid a dependency
on version 3.81.

Is there a simple workaround for using $(eval) within
conditionally-evaluated parts of a Makefile in 3.80?

Jason





reply via email to

[Prev in Thread] Current Thread [Next in Thread]