Date: Mon, 10 Jun 2013 12:10:36 +0100 From: Chris Rees <crees@FreeBSD.org> To: freebsd-toolchain@freebsd.org, tech-toolchain@netbsd.org, "Simon J. Gerraty" <sjg@freebsd.org> Subject: bmake exports disallowed environment variables Message-ID: <CADLo838uS=XqsL576rFFpd21=pzO-eSJjoCQzZcSb0=Vbh70aQ@mail.gmail.com>
index | next in thread | raw e-mail
[Hope I got the NetBSD list right...]
Hi all,
bmake appears to export ${.MAKE.LEVEL} into the environment, which sh
doesn't support, due to the leading '.'. Normally this is ignored,
but for example Tinderbox cleans the environment by unsetting
everything except a small list of variables, resulting in an error.
pmake (FreeBSD's make) exports it as ${__MKLVL__} (IIRC), which is
more portable.
I've worked around it in Tinderbox by adding .MAKE.LEVEL to the 'safe'
variable list, but I think exporting incompatible envars to sh(1) is
undesirable.
Can anyone come up with a possibly solution? My preferred solution is
to export __MKLVL__ and allow ${.MAKE.LEVEL} to be recognised as
${__MKLVL__} in Makefiles, possibly with a warning?
I'll see if I can make a patch for this behaviour, unless anyone has a
better idea.
Chris
http://svnweb.freebsd.org/base/head/contrib/bmake/var.c?revision=251422&view=markup#l970
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADLo838uS=XqsL576rFFpd21=pzO-eSJjoCQzZcSb0=Vbh70aQ>
