mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Richard Günther" <richard.guenther@garz-fricke.com>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] Problem with variable reference in Makefiles
Date: Tue, 29 Oct 2013 15:37:50 +0100	[thread overview]
Message-ID: <D99582E5322435468A77E74BB0039E7B3E5B712189@SRV02.hamburg.garz-fricke.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 1000 bytes --]

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.

Thanks in advance, 
Richard

[-- Attachment #2: automaddel.make --]
[-- Type: application/octet-stream, Size: 2262 bytes --]

# -*-makefile-*-
#
# Copyright (C) 2012 by Tim Jaacks <tim.jaacks@garz-fricke.com>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_AUTOMADDEL) += automaddel

#
# Paths and names
#
AUTOMADDEL_VERSION	:= trunk
AUTOMADDEL 			:= automaddel
AUTOMADDEL_SUFFIX	:=
AUTOMADDEL_URL		:= file://$(PTXDIST_WORKSPACE)/local_src/automaddel
AUTOMADDEL_SRCDIR 	:= $(PTXDIST_WORKSPACE)/local_src/$(AUTOMADDEL)
AUTOMADDEL_DIR		:= $(BUILDDIR)/$(AUTOMADDEL)
AUTOMADDEL_LICENSE	:= unknown

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

$(STATEDIR)/automaddel.extract:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

$(STATEDIR)/automaddel.prepare:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

$(STATEDIR)/automaddel.compile:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/automaddel.install:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/automaddel.targetinstall:
	@$(call targetinfo)

	@$(call install_init,  automaddel)
	@$(call install_fixup, automaddel, PRIORITY, optional)
	@$(call install_fixup, automaddel, VERSION, AUTOMADDEL_VERSION)
	@$(call install_fixup, automaddel, SECTION, base)
	@$(call install_fixup, automaddel, AUTHOR, "Tim Jaacks <tim.jaacks@garz-fricke.com>")
	@$(call install_fixup, automaddel, DESCRIPTION, missing)

	@$(call install_finish, automaddel)
	@$(call touch)

# vim: syntax=make

[-- Attachment #3: automoddel.make --]
[-- Type: application/octet-stream, Size: 2262 bytes --]

# -*-makefile-*-
#
# Copyright (C) 2012 by Tim Jaacks <tim.jaacks@garz-fricke.com>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_AUTOMODDEL) += automoddel

#
# Paths and names
#
AUTOMODDEL_VERSION	:= trunk
AUTOMODDEL 			:= automoddel
AUTOMODDEL_SUFFIX	:=
AUTOMODDEL_URL		:= file://$(PTXDIST_WORKSPACE)/local_src/automoddel
AUTOMODDEL_SRCDIR 	:= $(PTXDIST_WORKSPACE)/local_src/$(AUTOMODDEL)
AUTOMODDEL_DIR		:= $(BUILDDIR)/$(AUTOMODDEL)
AUTOMODDEL_LICENSE	:= unknown

# ----------------------------------------------------------------------------
# Extract
# ----------------------------------------------------------------------------

$(STATEDIR)/automoddel.extract:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

$(STATEDIR)/automoddel.prepare:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Compile
# ----------------------------------------------------------------------------

$(STATEDIR)/automoddel.compile:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Install
# ----------------------------------------------------------------------------

$(STATEDIR)/automoddel.install:
	@$(call targetinfo)
	@$(call touch)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/automoddel.targetinstall:
	@$(call targetinfo)

	@$(call install_init,  automoddel)
	@$(call install_fixup, automoddel, PRIORITY, optional)
	@$(call install_fixup, automoddel, VERSION, AUTOMODDEL_VERSION)
	@$(call install_fixup, automoddel, SECTION, base)
	@$(call install_fixup, automoddel, AUTHOR, "Tim Jaacks <tim.jaacks@garz-fricke.com>")
	@$(call install_fixup, automoddel, DESCRIPTION, missing)

	@$(call install_finish, automoddel)
	@$(call touch)

# vim: syntax=make

[-- Attachment #4: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2013-10-29 14:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-29 14:37 Richard Günther [this message]
2013-10-29 14:49 ` Andreas Bießmann
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=D99582E5322435468A77E74BB0039E7B3E5B712189@SRV02.hamburg.garz-fricke.de \
    --to=richard.guenther@garz-fricke.com \
    --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