Dear Richard Günther,

Am 2013-10-29 15:37, schrieb Richard Günther:
Hi,

I am having problems with Makefiles in which I am referring to
variables that are defined in other Makefiles. Sometimes it is working
and I get the correct value, but for some packages I am getting an
empty string.

So for testing I set up two identical packages "automoddel" and
"automaddel" (see attachment).  The only difference is the "a" and the
"o", everything else is 100% the same. Then in another Makefile I
refer to variables of these packages like this:

TEST1 := $(AUTOMADDEL_VERSION)
TEST2 := $(AUTOMODDEL_VERSION)

Now the curious thing is that "TEST1" contains the correct version
"trunk", but "TEST2" is contains an empty string:

"ptxdist print TEST1" returns: trunk
"ptxdist print TEST2" returns:               (nothing)

If I change := to = the problem is gone, but that still not explains
why the := assignment is working for one package but not for another.
Maybe someone has a clue about that? I am using ptxdist-2011.09.0.

It has nothing to do with ptxdist, it is make related. Please read [1] to understand the difference between '=' and ':=' assignment.

The difference of TEST1 and TEST2 is the 'A' vs. 'O'. Have you tried to add for example AUTOMBDDEL or AAUTOMADDEL?

Best regards

Andreas Bießmann

[1] http://www.gnu.org/software/make/manual/make.html#Reading-Makefiles


--
ptxdist mailing list
[email protected]

Reply via email to