[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
function $(eval ...) in make 3.81 compared to 3.80
From: |
Jacques Klein |
Subject: |
function $(eval ...) in make 3.81 compared to 3.80 |
Date: |
Tue, 26 Jun 2007 15:00:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.8.1.2) Gecko/20070221 SeaMonkey/1.1.1 |
I just upgraded from v3.80 to 3.81 because of strange bugs when using
$(eval ...) on a MacOsX os (the same makefile works fine with a 3.80
make on Linux).
But now, I am "completelly lost" with the "new" behavior of $(eval ..);
to make things work, I have to sometimes use not just TWO $'s but FOUR
of them.
Is there some "expert" to explain this ?, or point to a good and
uptodate (3.81) tutorial for the $(eval ...) function ?.
Here is a makefile example showing the behaviour:
# -*- Makefile -*-
$(warning MAKE_VERSION=$(MAKE_VERSION))
x := x_val
$(eval $(warning 1 dollar: x=$x))
$(eval $(warning 2 dollars: x=$$x))
$(warning looks good, with 1 and 2 dollars)
%todo := 2dollars 4dollars
.PHONY: $(%todo)
todo: $(%todo)
$(eval 2dollars: \; @echo with 2 dollars: target=$$@)
$(eval 4dollars: \; @echo with 4 dollars: target=$$$$@)
And is here what I get:
../src/makefile.eval:3: MAKE_VERSION=3.80
../src/makefile.eval:6: 1 dollar: x=x_val
../src/makefile.eval:7: 2 dollars: x=$x
../src/makefile.eval:8: looks good, with 1 and 2 dollars
with 2 dollars: target=2dollars
with 4 dollars: target=
and
../src/makefile.eval:3: MAKE_VERSION=3.81
../src/makefile.eval:6: 1 dollar: x=x_val
../src/makefile.eval:7: 2 dollars: x=$x
../src/makefile.eval:8: looks good, with 1 and 2 dollars
with 2 dollars: target=
with 4 dollars: target=4dollars
- function $(eval ...) in make 3.81 compared to 3.80,
Jacques Klein <=