summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorapb <apb@NetBSD.org>2012-12-03 13:53:28 +0000
committerapb <apb@NetBSD.org>2012-12-03 13:53:28 +0000
commitdf5816a8bc70b2fe209002e5577503e361ee8e96 (patch)
treed5e24f8d2c8f42e4e94a5d4d733b1ec68319af6b /Makefile
parent3290ec5fcc24a328f4744136bc278f8e4d634aa4 (diff)
Add src/etc/Makefile.params, containing the definition of the
RELEASEVARS variable, and commands related to printing the values of the variables whose names are in RELEASEVARS. Add an awk script to remove noise printed by "make -j" or high levels of MAKEVERBOSE, so we get only the variables names and values. The values are escaped so that variables containing embedded newlines, quotation marks, and backslashes, are passed through safely. Adapt src/etc/Makefile and src/Makefile to use the new ${PRINT_PARAMS} command defined in src/etc/Makefile.params. Now ${DESTDIR}/etc/release and the params file in the top-level .OBJDIR should never contain unwanted noise, even after a build with MAKEVERBOSE=4.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 4ecff4ea5a0..134d1d98f8d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.301 2012/11/15 23:51:53 joerg Exp $
+# $NetBSD: Makefile,v 1.302 2012/12/03 13:53:29 apb Exp $
#
# This is the top-level makefile for building NetBSD. For an outline of
@@ -259,11 +259,11 @@ includes-gnu: .PHONY includes-lib
#
# This is referenced by _NETBSD_VERSION_DEPENDS in <bsd.own.mk>.
#
-
+.include "${NETBSDSRCDIR}/etc/Makefile.params"
CLEANDIRFILES+= params
params: .EXEC
${_MKMSG_CREATE} params
- @(${MAKEDIRTARGET:S/^@//} etc params) >${.TARGET}.new
+ @${PRINT_PARAMS} >${.TARGET}.new
@if cmp -s ${.TARGET}.new ${.TARGET} > /dev/null 2>&1; then \
: "params is unchanged" ; \
rm ${.TARGET}.new ; \
@@ -273,6 +273,12 @@ params: .EXEC
fi
#
+# Display current make(1) parameters
+#
+show-params: .PHONY .MAKE
+ @${PRINT_PARAMS}
+
+#
# Build the system and install into DESTDIR.
#
@@ -521,9 +527,3 @@ dependall-distrib depend-distrib all-distrib: .PHONY
.include <bsd.obj.mk>
.include <bsd.kernobj.mk>
.include <bsd.subdir.mk>
-
-#
-# Display current make(1) parameters
-#
-show-params: .PHONY .MAKE
- ${MAKEDIRTARGET} etc params