From: "Andreas Bießmann" <andreas@biessmann.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Problem with variable reference in Makefiles
Date: Tue, 29 Oct 2013 15:49:31 +0100 [thread overview]
Message-ID: <b076e772af0f7a278d03c81ce1e3e127@biessmann.de> (raw)
In-Reply-To: <D99582E5322435468A77E74BB0039E7B3E5B712189@SRV02.hamburg.garz-fricke.de>
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
ptxdist@pengutronix.de
next prev parent reply other threads:[~2013-10-29 14:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 14:37 Richard Günther
2013-10-29 14:49 ` Andreas Bießmann [this message]
2013-10-31 7:35 Richard Günther
2013-10-31 8:07 ` Jürgen Beisert
2013-10-31 9:21 Richard Günther
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b076e772af0f7a278d03c81ce1e3e127@biessmann.de \
--to=andreas@biessmann.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox