Subject: pkg/22305: pkgsrc makefile option to make "The following variables..." optional
To: None <gnats-bugs@gnats.netbsd.org>
From: None <kre@munnari.OZ.AU>
List: netbsd-bugs
Date: 07/30/2003 19:05:05
>Number: 22305
>Category: pkg
>Synopsis: pkgsrc makefile option to make "The following variables..." optional
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Jul 30 12:06:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Robert Elz
>Release: NetBSD 1.6Q (pkgsrc -current as of 2003-07-30 .. now)
>Organization:
Prince of Songkla University
>Environment:
This is irrelevant information, but never mind...
System: NetBSD jade.coe.psu.ac.th 1.6Q NetBSD 1.6Q (JADE-HP) #0: Sun Mar 23 02:27:44 ICT 2003 kre@fuchsia.cs.mu.OZ.AU:/usr/obj/sys/JADE-HP i386
Architecture: i386
Machine: i386
>Description:
The new pkgsrc behaviour of saying
The following variables will affect the build process of this package
[etc]
when building a package is great. But there are times when
all it achieves is lots of useless noise in the output file,
(bulk builds, I'd assume, I get it when I do "make checksum"
or "make fetch" of everything). It would be nice to have a
method that can be used to disable it.
>How-To-Repeat:
Run "make <anything>" in any of quite a lot of pkgsrc packages.
>Fix:
The following patch to bsd.pkg.mk adds a new variable, which I
called DISPLAY_PKG_OPTIONS (name is not important) which if
explicitly set to NO will cause the BUILD_DEFS list to not
be displayed.
The patch gives the default value (YES) for the option also in
bas.pkg.mk, but I suspect that it relaly belongs in one of the
other mk/*.mk files (bsd.pref.mk or something). I'll leave that
to someone who knows the pkgsrc mk system to handle however is
appropriate.
There should also (probably) be some documentation of this,
somewhere, but I don't know where that somewhere is, and as
any doc would need to be revised anyway when a final name for
the option is picked, it didn't see worthwhile to contribute
anything (all it would be is a line...) Or that's my excuse
anyway!
Index: bsd.pkg.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.pkg.mk,v
retrieving revision 1.1225
diff -u -4 -r1.1225 bsd.pkg.mk
--- bsd.pkg.mk 2003/07/28 20:01:54 1.1225
+++ bsd.pkg.mk 2003/07/30 11:53:44
@@ -29,14 +29,16 @@
.if defined(USETOOLS)
MAKE_ENV+= USETOOLS="${USETOOLS}"
.endif
+DISPLAY_PKG_OPTIONS?= Yes
+
# 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)
+.if defined(BUILD_DEFS) && !empty(BUILD_DEFS) && empty(DISPLAY_PKG_OPTIONS:M[nN][oO])
@${ECHO} "=========================================================================="
@${ECHO} "The following variables will affect the build process of this package,"
@${ECHO} "${PKGNAME}. Their current value is shown below:"
@${ECHO} ""
>Release-Note:
>Audit-Trail:
>Unformatted: