pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk Re-model the BUILD_DEFS display during build: if PK...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/082f8a6d1212
branches:  trunk
changeset: 459805:082f8a6d1212
user:      agc <agc%pkgsrc.org@localhost>
date:      Fri Aug 08 08:43:37 2003 +0000

description:
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:

 mk/bsd.pkg.defaults.mk |   9 ++++++++-
 mk/bsd.pkg.mk          |  26 ++++++++++++++------------
 2 files changed, 22 insertions(+), 13 deletions(-)

diffs (76 lines):

diff -r 3ce925082092 -r 082f8a6d1212 mk/bsd.pkg.defaults.mk
--- a/mk/bsd.pkg.defaults.mk    Fri Aug 08 08:32:37 2003 +0000
+++ b/mk/bsd.pkg.defaults.mk    Fri Aug 08 08:43:37 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.defaults.mk,v 1.171 2003/08/07 16:14:05 agc Exp $
+# $NetBSD: bsd.pkg.defaults.mk,v 1.172 2003/08/08 08:43:39 agc Exp $
 #
 
 # A file providing defaults for pkgsrc and the packages collection.
@@ -90,6 +90,13 @@
 # Possible: any login names
 # Default: none
 
+#PKGSRC_SHOW_BUILD_DEFS=
+# Show BUILD_DEFS definitions for a package when it is being built
+# (BUILD_DEFS are extra definitions which govern how some packages are
+# built and behave)
+# Possible: defined, not defined
+# Default: not defined
+
 PKGSRC_RUN_TEST?=      no
 # Run test target before install
 # Possible: yes, no
diff -r 3ce925082092 -r 082f8a6d1212 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Fri Aug 08 08:32:37 2003 +0000
+++ b/mk/bsd.pkg.mk     Fri Aug 08 08:43:37 2003 +0000
@@ -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 @@
 # 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



Home | Main Index | Thread Index | Old Index