diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2018-03-01 02:38:17 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2018-03-01 02:38:17 +0800 |
commit | 3946e3d5e122e5f4af4bdc5077aa54d1c4c3dd8a (patch) | |
tree | cba9bb7acb8891438e947eb18510af4428a3c9bd /Mk | |
parent | 97c13c50afc8f901e4fd821a0f4d2a23a594db72 (diff) | |
download | freebsd-ports-gnome-3946e3d5e122e5f4af4bdc5077aa54d1c4c3dd8a.tar.gz freebsd-ports-gnome-3946e3d5e122e5f4af4bdc5077aa54d1c4c3dd8a.tar.zst freebsd-ports-gnome-3946e3d5e122e5f4af4bdc5077aa54d1c4c3dd8a.zip |
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)
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/Scripts/functions.sh | 20 | ||||
-rw-r--r-- | Mk/bsd.port.mk | 1 |
2 files changed, 3 insertions, 18 deletions
diff --git a/Mk/Scripts/functions.sh b/Mk/Scripts/functions.sh index 28ba04a89e08..252a357f9873 100644 --- a/Mk/Scripts/functions.sh +++ b/Mk/Scripts/functions.sh @@ -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}" diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index f2c4e924da9b..14685d5b0f39 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -4719,6 +4719,7 @@ ${_t}: .endif .endfor .endif +PORTS_ENV_VARS+= ${_EXPORTED_VARS} .if !target(pre-check-config) pre-check-config: |