pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/internal There is a difference between the variable...
details: https://anonhg.NetBSD.org/pkgsrc/rev/eb3d14b2a710
branches: trunk
changeset: 521080:eb3d14b2a710
user: rillig <rillig%pkgsrc.org@localhost>
date: Sat Nov 04 21:54:26 2006 +0000
description:
There is a difference between the variables that can be configured by
the user to affect how packages are built (BUILD_DEFS) and the effects
that those variables have (BUILD_DEFS_EFFECTS). The latter variable has
been introduced to clearly separate these two issues.
While here, reduced the indentation of the directives a little bit. One
visible change is that "make build-defs-message" will always show the
message when called directly. Before, it had been shown only once, which
makes debugging a bit more difficult.
diffstat:
mk/internal/build-defs-message.mk | 43 ++++++++++++++++++++++++++------------
1 files changed, 29 insertions(+), 14 deletions(-)
diffs (70 lines):
diff -r 1cb289cc807f -r eb3d14b2a710 mk/internal/build-defs-message.mk
--- a/mk/internal/build-defs-message.mk Sat Nov 04 21:45:23 2006 +0000
+++ b/mk/internal/build-defs-message.mk Sat Nov 04 21:54:26 2006 +0000
@@ -1,37 +1,52 @@
-# $NetBSD: build-defs-message.mk,v 1.1 2006/07/15 23:58:52 rillig Exp $
+# $NetBSD: build-defs-message.mk,v 1.2 2006/11/04 21:54:26 rillig Exp $
#
# The build-defs-message target shows the variables that can be configured
# by the pkgsrc user in mk.conf.
#
-.PHONY: build-defs-message
+BUILD_DEFS?= # none
+BUILD_DEFS_EFFECTS?= # none
+
+.if !empty(PKGSRC_SHOW_BUILD_DEFS:M[yY][eE][sS]) && !exists(${WRKDIR}/.bdm_done)
pre-depends-hook: build-defs-message
-.if empty(PKGSRC_SHOW_BUILD_DEFS:M[yY][eE][sS])
+.endif
+
+.PHONY: build-defs-message
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 !empty(BUILD_DEFS:M*)
@${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}
-. 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
+. if !empty(BUILD_DEFS_EFFECTS:M*)
+ @${ECHO} ""
+ @${ECHO} "Based on these variables, the following variables have been set:"
+ @${ECHO} ""
+. endif
+. for v in ${BUILD_DEFS_EFFECTS}
+. if !defined(${v})
+ @${ECHO} " * ${v} (not defined)"
+. elif defined(${v}) && empty(${v})
+ @${ECHO} " * ${v} (defined, but empty)"
+. else
+ @${ECHO} " * ${v} = "${${v}:Q}""
+. 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"
@${ECHO} "the changes."
@${ECHO} "=========================================================================="
@${TOUCH} ${WRKDIR}/.bdm_done
-. endif
-. endif
.endif
Home |
Main Index |
Thread Index |
Old Index