From owner-freebsd-toolchain@FreeBSD.ORG Mon Jun 10 11:11:07 2013 Return-Path: Delivered-To: freebsd-toolchain@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2470DB3E; Mon, 10 Jun 2013 11:11:07 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) by mx1.freebsd.org (Postfix) with ESMTP id E490F1E6F; Mon, 10 Jun 2013 11:11:06 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id e11so131858iej.15 for ; Mon, 10 Jun 2013 04:11:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=tRHAok95UhIjuyCSXoMLF9or36vkeQMhiztIbJ1mcQs=; b=q68gLTr1MHA4mPM2H/L6l2BuLJn5LsxHkSdV3EKz+1bNvpdo116v2Vy84lRmAVT/U4 Nxz69vHVl2C/ZteTxYmC7faGmgIsvcam1t5mCyAOzPYTASaipuIgfFfWjl0yc6O5/a91 Wg0w0DSUAes5ZvMOUUidlV1XoPTEJorzNHLKd+GotbX7sNJOsbkYKp/9WlW+uNpTVfSI qM4Gcchg/1FWFOPmKF4lsGMuPtvRNcHVZb9brWeHZiWAkCDdruyNwQh5Pudp+XOWp4w+ HajcsN3giQYYa4PCUmRWgnM+6bY0x1vDtwiHohRloYeXK31d1SvWG469xI4G75Y3v3/z 0I2A== X-Received: by 10.50.20.133 with SMTP id n5mr418393ige.65.1370862666635; Mon, 10 Jun 2013 04:11:06 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.64.28.131 with HTTP; Mon, 10 Jun 2013 04:10:36 -0700 (PDT) From: Chris Rees Date: Mon, 10 Jun 2013 12:10:36 +0100 X-Google-Sender-Auth: BMgHk20AeJiEZSvzm6GS70YsS_o Message-ID: Subject: bmake exports disallowed environment variables To: freebsd-toolchain@freebsd.org, tech-toolchain@netbsd.org, "Simon J. Gerraty" Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jun 2013 11:11:07 -0000 [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