From owner-svn-ports-head@freebsd.org Mon Oct 12 22:19:36 2015 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E1ADA11545; Mon, 12 Oct 2015 22:19:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 364D9B6F; Mon, 12 Oct 2015 22:19:36 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9CMJZcA059409; Mon, 12 Oct 2015 22:19:35 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9CMJZqI059408; Mon, 12 Oct 2015 22:19:35 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510122219.t9CMJZqI059408@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Mon, 12 Oct 2015 22:19:35 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r399159 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Oct 2015 22:19:36 -0000 Author: bdrewery Date: Mon Oct 12 22:19:35 2015 New Revision: 399159 URL: https://svnweb.freebsd.org/changeset/ports/399159 Log: Move the exported variable assignments to where they are looked-up. This is so we are less likely to carry around old vars that are no longer needed and to keep logic more coupled. With hat: portmgr Modified: head/Mk/bsd.port.mk Modified: head/Mk/bsd.port.mk ============================================================================== --- head/Mk/bsd.port.mk Mon Oct 12 22:17:09 2015 (r399158) +++ head/Mk/bsd.port.mk Mon Oct 12 22:19:35 2015 (r399159) @@ -1166,18 +1166,22 @@ MAINTAINER?= ports@FreeBSD.org .if !defined(ARCH) ARCH!= ${UNAME} -p .endif +_EXPORTED_VARS+= ARCH # Get the operating system type .if !defined(OPSYS) OPSYS!= ${UNAME} -s .endif +_EXPORTED_VARS+= OPSYS .if !defined(UNAMER) UNAMER!= ${UNAME} -r .endif +_EXPORTED_VARS+= UNAMER # Get the operating system revision OSREL?= ${UNAMER:C/-.*//} +_EXPORTED_VARS+= OSREL # Get __FreeBSD_version .if !defined(OSVERSION) @@ -1189,6 +1193,7 @@ OSVERSION!= ${AWK} '/^\#define[[:blank:] .error Unable to determine OS version. Either define OSVERSION, install /usr/include/sys/param.h or define SRC_BASE. .endif .endif +_EXPORTED_VARS+= OSVERSION # Convert OSVERSION to major release number _OSVERSION_MAJOR= ${OSVERSION:C/([0-9]?[0-9])([0-9][0-9])[0-9]{3}/\1/} @@ -1215,6 +1220,7 @@ IGNORE= pkg(8) must be version ${MINIMA .endif _PKG_CHECKED= 1 .endif +_EXPORTED_VARS+= _PKG_CHECKED MASTERDIR?= ${.CURDIR} @@ -5054,7 +5060,6 @@ ${_t}: .if !defined(NOPRECIOUSMAKEVARS) # These won't change, so we can pass them through the environment -_EXPORTED_VARS= ARCH OPSYS OSREL OSVERSION UNAMER _PKG_CHECKED .for var in ${_EXPORTED_VARS} .if empty(.MAKEFLAGS:M${var}=*) .MAKEFLAGS: ${var}=${${var}:Q}