misc/155629: [bsd.port.mk] [patch] remove outdates
NOPRECIOUSMAKEVARS checks
Eitan Adler
lists at eitanadler.com
Thu Mar 17 15:20:12 UTC 2011
>Number: 155629
>Category: misc
>Synopsis: [bsd.port.mk] [patch] remove outdates NOPRECIOUSMAKEVARS checks
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Mar 17 15:20:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Eitan Adler
>Release:
>Organization:
>Environment:
>Description:
NOPRECIOUSSOFTMAKEVARS is always set on all supported releases and is therefore never undefined. As such code which checks to see if it is defined should be removed.
>How-To-Repeat:
$/usr/obj/usr/src/release/7.1.0/usr.bin/make/make -V MAKE_VERSION
5200408120
$/usr/obj/usr/src/release/7.4.0/usr.bin/make/make -V MAKE_VERSION
5200408120
$/usr/obj/usr/src/stable/8/usr.bin/make/make -V MAKE_VERSION
5200408120
$/usr/obj/usr/src/head/usr.bin/make/make -V MAKE_VERSION
5200408120
$bc <<<"5200408120 - 5200408030"
90
>Fix:
Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.674
diff -u -r1.674 bsd.port.mk
--- bsd.port.mk 7 Mar 2011 07:32:05 -0000 1.674
+++ bsd.port.mk 17 Mar 2011 14:16:10 -0000
@@ -1189,12 +1189,6 @@
# Start of options section
.if defined(INOPTIONSMK) || ( !defined(USEOPTIONSMK) && !defined(AFTERPORTMK) )
-.if defined(MAKE_VERSION)
-.if ${MAKE_VERSION} >= 5200408030 || ${MAKE_VERSION} >= 4200408030 && ${MAKE_VERSION} < 5000000000
-NOPRECIOUSSOFTMAKEVARS= yes
-.endif
-.endif
-
# Get the default maintainer
MAINTAINER?= ports at FreeBSD.org
@@ -6051,24 +6045,6 @@
tags:
.endif
-.if !defined(NOPRECIOUSSOFTMAKEVARS)
-.for softvar in CKSUMFILES _MLINKS
-.if defined(${softvar})
-__softMAKEFLAGS+= '${softvar}+=${${softvar}:S/'/'\''/g}'
-.endif
-.endfor
-.endif
-
-.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}"
-.endif
-
.if !target(config)
config:
.if !defined(OPTIONS)
Index: bsd.port.subdir.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.subdir.mk,v
retrieving revision 1.77
diff -u -r1.77 bsd.port.subdir.mk
--- bsd.port.subdir.mk 20 Dec 2010 12:23:52 -0000 1.77
+++ bsd.port.subdir.mk 17 Mar 2011 14:16:10 -0000
@@ -67,11 +67,6 @@
# (index build, etc), so it is more efficient to precompute them here and pass them in
# to child makes explicitly, instead of recomputing them tens of thousands of times.
-.if !defined(NOPRECIOUSMAKEVARS)
-.if !defined(ARCH)
-ARCH!= ${UNAME} -p
-.endif
-
.if !defined(OSVERSION)
.if exists(/usr/include/sys/param.h)
OSVERSION!= ${AWK} '/^\#define[[:blank:]]__FreeBSD_version/ {print $$3}' < /usr/include/sys/param.h
@@ -362,27 +357,6 @@
> $@
@${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}" \
- PKGINSTALLVER="${PKGINSTALLVER:S/"/"'"'"/g:S/\$/\$\$/g:S/\\/\\\\/g}" \
- HAVE_COMPAT_IA32_KERN="${HAVE_COMPAT_IA32_KERN}" \
- CONFIGURE_MAX_CMD_LEN="${CONFIGURE_MAX_CMD_LEN}" \
- PYTHON_DEFAULT_VERSION="${PYTHON_DEFAULT_VERSION}" \
- PYTHON_DEFAULT_PORTVERSION="${PYTHON_DEFAULT_PORTVERSION}" \
- PYTHONBASE="${PYTHONBASE}" \
- _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}"
-.endif
-
PORTSEARCH_DISPLAY_FIELDS?=name,path,info,maint,index,bdeps,rdeps,www
PORTSEARCH_KEYLIM?=0
PORTSEARCH_XKEYLIM?=0
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list