[Midnightbsd-cvs] mports [22234] trunk/Mk/bsd.mport.mk: Use a loop to export vars.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Fri Jan 27 11:08:25 EST 2017
Revision: 22234
http://svnweb.midnightbsd.org/mports/?rev=22234
Author: laffer1
Date: 2017-01-27 11:08:25 -0500 (Fri, 27 Jan 2017)
Log Message:
-----------
Use a loop to export vars.
This also fixes adding duplicates to .MAKEFLAGS with fmake, which was a
bug present before recent changes.
Modified Paths:
--------------
trunk/Mk/bsd.mport.mk
Modified: trunk/Mk/bsd.mport.mk
===================================================================
--- trunk/Mk/bsd.mport.mk 2017-01-26 01:16:21 UTC (rev 22233)
+++ trunk/Mk/bsd.mport.mk 2017-01-27 16:08:25 UTC (rev 22234)
@@ -4130,13 +4130,13 @@
.if !defined(NOPRECIOUSMAKEVARS)
# These won't change, so we can pass them through the environment
-.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}" \
- SYSTEMVERSION="${SYSTEMVERSION:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}"
+_EXPORTED_VARS= ARCH OPSYS OPREL OSVERSION
+.for var in ${_EXPORTED_VARS}
+.if empty(.MAKEFLAGS:M${var}=*)
+.MAKEFLAGS: ${var}=${${var}:Q}
.endif
+.endfor
+.endif
desktop-categories:
@categories=""; \
More information about the Midnightbsd-cvs
mailing list