Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Sep 2015 22:25:06 +0000 (UTC)
From:      Christian Weisgerber <naddy@mips.inka.de>
To:        freebsd-ports@freebsd.org
Subject:   FreeBSD 9: make: Error expanding embedded variable
Message-ID:  <slrnmvro62.94q.naddy@lorvorc.mips.inka.de>

Next in thread | Raw E-Mail | Index | Archive | Help
The po/Makefile.in.in file shipped with gettext 0.19 triggers a bug
in the old make(1) on FreeBSD 9 that causes this cryptic error:

Error expanding embedded variable.

A minimal Makefile to reproduce the problem is this:

FOO =
BAR = $(FOO$(BAZ))
all: $(BAR)

The bug no longer exists in bmake.

If you google for the error message, you'll find the advice "use
gmake", which is not particularly appropriate in this case, since
po/Makefile.in.in is portable and does not use any gmake features.

The po/Makefile.in.in that ships with gettext is copied into a
zillion projects.  I ran into the problem when pkg-fallout sent me
a report about my recent archivers/gcpio update.  I expect the
problem to spread, as projects start using newer versions of this
file.

Here's the fix I used:

--- po/Makefile.in.in.orig	2015-09-12 10:51:46 UTC
+++ po/Makefile.in.in
@@ -80,6 +80,7 @@ CATALOGS = @CATALOGS@
 POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
 POFILESDEPS_yes = $(POFILESDEPS_)
 POFILESDEPS_no =
+PO_DEPENDS_ON_POT =
 POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
 
 DISTFILESDEPS_ = update-po
-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?slrnmvro62.94q.naddy>