svn commit: r463257 - in head/Mk: . Scripts

Bryan Drewery bdrewery at FreeBSD.org
Wed Feb 28 18:38:18 UTC 2018


Author: bdrewery
Date: Wed Feb 28 18:38:17 2018
New Revision: 463257
URL: https://svnweb.freebsd.org/changeset/ports/463257

Log:
  ports_env: Store list of variables to export in PORTS_ENV_VARS in mk files.
  
  This will avoid renamed/removed variables being orphaned, and allows for
  exporting variables in ports_env that are not wanted to be exported in
  sub-makes via _EXPORTED_VARS.
  
  Approved by:	portmgr (implicit)

Modified:
  head/Mk/Scripts/functions.sh
  head/Mk/bsd.port.mk

Modified: head/Mk/Scripts/functions.sh
==============================================================================
--- head/Mk/Scripts/functions.sh	Wed Feb 28 18:34:31 2018	(r463256)
+++ head/Mk/Scripts/functions.sh	Wed Feb 28 18:38:17 2018	(r463257)
@@ -176,24 +176,8 @@ export_ports_env() {
 
 	make_cmd="${make_env}"
 
-	export_vars="\
-		ARCH \
-		CONFIGURE_MAX_CMD_LEN \
-		HAVE_COMPAT_IA32_KERN \
-		OPSYS \
-		OSREL \
-		OSVERSION \
-		PYTHONBASE \
-		UID \
-		_JAVA_OS_LIST_REGEXP \
-		_JAVA_PORTS_INSTALLED \
-		_JAVA_VENDOR_LIST_REGEXP \
-		_JAVA_VERSION_LIST_REGEXP \
-		_OSRELEASE \
-		_PERL5_FROM_BIN \
-		_PKG_CHECKED \
-		_SMP_CPUS \
-	"
+	export_vars="$(${MAKE} -f ${PORTSDIR}/Mk/bsd.port.mk \
+	    -V PORTS_ENV_VARS ${make_env} USES="${uses}")"
 
 	for var in ${export_vars}; do
 		make_cmd="${make_cmd}${make_cmd:+ }-V ${var}=\${${var}:Q}"

Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk	Wed Feb 28 18:34:31 2018	(r463256)
+++ head/Mk/bsd.port.mk	Wed Feb 28 18:38:17 2018	(r463257)
@@ -4719,6 +4719,7 @@ ${_t}:
 .endif
 .endfor
 .endif
+PORTS_ENV_VARS+=	${_EXPORTED_VARS}
 
 .if !target(pre-check-config)
 pre-check-config:


More information about the svn-ports-head mailing list