summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2003-07-28 18:15:56 +0000
committerjmmv <jmmv@pkgsrc.org>2003-07-28 18:15:56 +0000
commit784ad979397e315497404057e7f1806ef7061087 (patch)
treef135c13ac910c765a23b313517e2a45dc00ee8dc /mk
parentfa0be284389c26d4d774e8268f7fd6e42d916f8c (diff)
downloadpkgsrc-784ad979397e315497404057e7f1806ef7061087.tar.gz
Add the build-defs-message target, which shows a list of all variables that
can be customized for the package beeing built. This list is extracted from the contents of BUILD_DEFS, and the message is not shown if it's empty. Each variable is printed together with its actual value. The new target is called in the pre-fetch stage, so it's shown early to the user.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk27
1 files changed, 26 insertions, 1 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 817ae5a1e7c..4c2cf736f00 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1223 2003/07/24 22:27:16 dmcmahill Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1224 2003/07/28 18:15:56 jmmv Exp $
#
# This file is in the public domain.
#
@@ -30,6 +30,31 @@ MAKE_ENV+= MAKECONF=/dev/null
MAKE_ENV+= USETOOLS="${USETOOLS}"
.endif
+# This has to come first to avoid showing all BUILD_DEFS added by this
+# Makefile, which are usually not customizable.
+.PHONY: pre-fetch build-defs-message
+pre-fetch: build-defs-message
+build-defs-message:
+.if defined(BUILD_DEFS) && !empty(BUILD_DEFS)
+ @${ECHO} "=========================================================================="
+ @${ECHO} "The following variables will affect the build process of this package,"
+ @${ECHO} "${PKGNAME}. Their current value is shown below:"
+ @${ECHO} ""
+.for var in ${BUILD_DEFS:O:u}
+.if !defined(${var})
+ @${ECHO} " * ${var} (not defined)"
+.elif defined(${var}) && empty(${var})
+ @${ECHO} " * ${var} (defined)"
+.else
+ @${ECHO} " * ${var} = ${${var}}"
+.endif
+.endfor
+ @${ECHO} ""
+ @${ECHO} "You may want to abort the process now with CTRL+C and change their value"
+ @${ECHO} "before continuing. Be sure to run \`${MAKE} clean' after the changes."
+ @${ECHO} "=========================================================================="
+.endif
+
##### Some NetBSD platforms permitted the user to set the binary format while
##### they were in the process of transitioning to ELF. Packages with BSD-style
##### make systems need this setting to be passed in.