tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bmake exports disallowed environment variables



In article 
<CADLo838uS=XqsL576rFFpd21=pzO-eSJjoCQzZcSb0=Vbh70aQ%mail.gmail.com@localhost>,
Chris Rees  <crees%FreeBSD.org@localhost> wrote:
>[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.

I changed it to be ${MAKELEVEL} like gmake does...

christos



Home | Main Index | Thread Index | Old Index