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



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to