diff options
author | bdrewery <bdrewery@FreeBSD.org> | 2015-10-13 06:42:57 +0800 |
---|---|---|
committer | bdrewery <bdrewery@FreeBSD.org> | 2015-10-13 06:42:57 +0800 |
commit | 0d5d070e4a6baa88e30a7f7c161303304e529d05 (patch) | |
tree | 80dc6acd921af23391dbb7456594eb249ec5448f /Mk/bsd.port.subdir.mk | |
parent | 1b8073fe1ba450ac58d50461dc60ff23237b520a (diff) | |
download | freebsd-ports-gnome-0d5d070e4a6baa88e30a7f7c161303304e529d05.tar.gz freebsd-ports-gnome-0d5d070e4a6baa88e30a7f7c161303304e529d05.tar.zst freebsd-ports-gnome-0d5d070e4a6baa88e30a7f7c161303304e529d05.zip |
Apply export handling fixes from bsd.port.mk.
- r399153: Use :Q.
- r399155: Use a loop to export vars
With hat: portmgr
Diffstat (limited to 'Mk/bsd.port.subdir.mk')
-rw-r--r-- | Mk/bsd.port.subdir.mk | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk index c879ac77a5a9..d688efdbe87e 100644 --- a/Mk/bsd.port.subdir.mk +++ b/Mk/bsd.port.subdir.mk @@ -63,6 +63,7 @@ STRIP?= -s .if !defined(ARCH) ARCH!= ${UNAME} -p .endif +_EXPORTED_VARS+= ARCH .if !defined(OSVERSION) .if exists(/usr/include/sys/param.h) @@ -73,20 +74,24 @@ OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < ${SRC OSVERSION!= ${SYSCTL} -n kern.osreldate .endif .endif +_EXPORTED_VARS+= OSVERSION WITH_PKG= yes WITH_PKGNG= yes .if !defined(_OSRELEASE) -_OSRELEASE!= ${UNAME} -r +_OSRELEASE!= ${UNAME} -r .endif +_EXPORTED_VARS+= _OSRELEASE .if !defined(OSREL) OSREL= ${_OSRELEASE:C/[-(].*//} .endif +_EXPORTED_VARS+= OSREL .if !defined(OPSYS) OPSYS!= ${UNAME} -s .endif +_EXPORTED_VARS+= OPSYS .if ${ARCH} == "amd64" || ${ARCH} =="ia64" .if !defined(HAVE_COMPAT_IA32_KERN) @@ -96,30 +101,37 @@ HAVE_COMPAT_IA32_KERN!= if ${SYSCTL} -n compat.ia32.maxvmem >/dev/null 2>&1; the .endif .endif .endif +_EXPORTED_VARS+= HAVE_COMPAT_IA32_KERN .if !defined(CONFIGURE_MAX_CMD_LEN) CONFIGURE_MAX_CMD_LEN!= ${SYSCTL} -n kern.argmax .endif +_EXPORTED_VARS+= CONFIGURE_MAX_CMD_LEN .if !defined(_JAVA_VERSION_LIST_REGEXP) _JAVA_VERSION_LIST_REGEXP!= ${MAKE} -V _JAVA_VERSION_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif +_EXPORTED_VARS+= _JAVA_VERSION_LIST_REGEXP .if !defined(_JAVA_VENDOR_LIST_REGEXP) _JAVA_VENDOR_LIST_REGEXP!= ${MAKE} -V _JAVA_VENDOR_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif +_EXPORTED_VARS+= _JAVA_VENDOR_LIST_REGEXP .if !defined(_JAVA_OS_LIST_REGEXP) _JAVA_OS_LIST_REGEXP!= ${MAKE} -V _JAVA_OS_LIST_REGEXP USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif +_EXPORTED_VARS+= _JAVA_OS_LIST_REGEXP .if !defined(_JAVA_PORTS_INSTALLED) _JAVA_PORTS_INSTALLED!= ${MAKE} -V _JAVA_PORTS_INSTALLED USE_JAVA=1 -f ${PORTSDIR}/Mk/bsd.port.mk .endif +_EXPORTED_VARS+= _JAVA_PORTS_INSTALLED .if !defined(UID) UID!= ${ID} -u .endif +_EXPORTED_VARS+= UID .endif @@ -336,20 +348,12 @@ README.html: @${RM} -f $@.tmp $@.tmp2 $@.tmp3 $@.tmp4 # Pass in the cached invariant variables to child makes. -# XXX Why are we trying to escape these characters using regexps and not using ':Q'? .if !defined(NOPRECIOUSMAKEVARS) -.MAKEFLAGS: \ - ARCH="${ARCH:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \ - OPSYS="${OPSYS:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \ - OSREL="${OSREL:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \ - OSVERSION="${OSVERSION:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \ - UID="${UID:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \ - HAVE_COMPAT_IA32_KERN="${HAVE_COMPAT_IA32_KERN}" \ - CONFIGURE_MAX_CMD_LEN="${CONFIGURE_MAX_CMD_LEN}" \ - _JAVA_VERSION_LIST_REGEXP="${_JAVA_VERSION_LIST_REGEXP:Q}" \ - _JAVA_VENDOR_LIST_REGEXP="${_JAVA_VENDOR_LIST_REGEXP:Q}" \ - _JAVA_OS_LIST_REGEXP="${_JAVA_OS_LIST_REGEXP:Q}" \ - _JAVA_PORTS_INSTALLED="${_JAVA_PORTS_INSTALLED}" +.for var in ${_EXPORTED_VARS} +.if empty(.MAKEFLAGS:M${var}=*) && !empty(${var}) +.MAKEFLAGS: ${var}=${${var}:Q} +.endif +.endfor .endif PORTSEARCH_DISPLAY_FIELDS?=name,path,info,maint,index,bdeps,rdeps,www |