summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>2003-08-08 08:43:37 +0000
committeragc <agc@pkgsrc.org>2003-08-08 08:43:37 +0000
commit60bc77fc38a1e77b312914991b8415e495838119 (patch)
tree5a165d306bbf110bbc57dec899b0201158bc06ef /mk/bsd.pkg.mk
parent8c3dd249abfe6008acc6d978e573b8785a09de90 (diff)
downloadpkgsrc-60bc77fc38a1e77b312914991b8415e495838119.tar.gz
Re-model the BUILD_DEFS display during build: if PKGSRC_SHOW_BUILD_DEFS is
defined, then show the BUILD_DEFS to the user. If not, then just keep quiet. Whilst I'm here, re-indent the cpp-like .if/.else/.endif/.for/.endfor lines properly. Also, remove the ":u" modifier in the build-defs-message code - it's not strictly necessary (duplicate definitions will be displayed, but this isn't a major problem), and it removes the requirement to have a make(1) binary which supports ":u". This should fix PR 22402 from Alan Barrett, and also addresses some concerns raised by Robert Elz.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk26
1 files changed, 14 insertions, 12 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index c1b40cfdc8c..0059f4914a8 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1231 2003/08/07 16:14:05 agc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1232 2003/08/08 08:43:37 agc Exp $
#
# This file is in the public domain.
#
@@ -34,30 +34,32 @@ MAKE_ENV+= USETOOLS="${USETOOLS}"
# Makefile, which are usually not customizable.
.PHONY: pre-extract build-defs-message
pre-extract: build-defs-message
-.if !target(build-defs-message)
+.if !defined(PKGSRC_SHOW_BUILD_DEFS)
+build-defs-message:
+.elif !target(build-defs-message)
build-defs-message: ${WRKDIR}
-.if defined(BUILD_DEFS) && !empty(BUILD_DEFS)
-.if !exists(${WRKDIR}/.bdm_done)
+. if defined(BUILD_DEFS) && !empty(BUILD_DEFS)
+. if !exists(${WRKDIR}/.bdm_done)
@${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})
+. for var in ${BUILD_DEFS:O}
+. if !defined(${var})
@${ECHO} " * ${var} (not defined)"
-. elif defined(${var}) && empty(${var})
+. elif defined(${var}) && empty(${var})
@${ECHO} " * ${var} (defined)"
-. else
+. else
@${ECHO} " * ${var} = ${${var}}"
-. endif
-. endfor
+. 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} "=========================================================================="
@${TOUCH} ${WRKDIR}/.bdm_done
-.endif
-.endif
+. endif
+. endif
.endif
##### Some NetBSD platforms permitted the user to set the binary format while