pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc mk/misc: make configuration for show-all targets more ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/1a17e3f3e521
branches: trunk
changeset: 388104:1a17e3f3e521
user: rillig <rillig%pkgsrc.org@localhost>
date: Fri Nov 30 18:38:19 2018 +0000
description:
mk/misc: make configuration for show-all targets more configurable
Up to now, there was a central list of variable name patterns that
defined whether a variable was printed as a sorted list, as a list or as
a single value.
Now each variable group decides on its own which of the variables are
printed in which way, using the usual glob patterns. This is more
flexible since different files sometimes differ in their naming
conventions.
Two variable groups are added: license (for everything related to
LICENSE) and go (for lang/go).
diffstat:
editors/emacs/modules.mk | 5 ++++-
lang/go/go-package.mk | 14 +++++++++++++-
mk/bsd.options.mk | 3 ++-
mk/build/bsd.build-vars.mk | 4 +++-
mk/build/build.mk | 4 +++-
mk/build/test.mk | 4 +++-
mk/configure/configure.mk | 4 +++-
mk/extract/bsd.extract-vars.mk | 3 ++-
mk/features/features-vars.mk | 3 ++-
mk/fetch/bsd.fetch-vars.mk | 3 ++-
mk/fetch/github.mk | 3 ++-
mk/java-vm.mk | 3 ++-
mk/license.mk | 8 +++++++-
mk/misc/show.mk | 39 ++++++++++++++++++++++-----------------
mk/pkginstall/bsd.pkginstall.mk | 4 +++-
mk/pkgtasks/bsd.pkgtasks.mk | 11 +++++++----
mk/plist/plist.mk | 4 +++-
mk/subst.mk | 4 +++-
mk/tools/bsd.tools.mk | 3 ++-
19 files changed, 88 insertions(+), 38 deletions(-)
diffs (truncated from 403 to 300 lines):
diff -r cb75c0dcfecb -r 1a17e3f3e521 editors/emacs/modules.mk
--- a/editors/emacs/modules.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/editors/emacs/modules.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: modules.mk,v 1.24 2018/06/24 21:19:10 wiz Exp $
+# $NetBSD: modules.mk,v 1.25 2018/11/30 18:38:19 rillig Exp $
#
# This Makefile fragment handles Emacs Lisp Packages (== ELPs).
#
@@ -214,6 +214,9 @@
EMACS_VERSION_MAJOR EMACS_VERSION_MINOR \
EMACS_VERSION_MICRO
_DEF_VARS.emacs= _EMACS_TYPE _EMACS_PKGBASE
+_SORTED_VARS.emacs= *_MODULES
+_LISTED_VARS.emacs= *VERSIONS*
+
BUILD_DEFS+= ${_USER_VARS.emacs}
BUILD_DEFS_EFFECTS+= ${_SYS_VARS.emacs}
diff -r cb75c0dcfecb -r 1a17e3f3e521 lang/go/go-package.mk
--- a/lang/go/go-package.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/lang/go/go-package.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: go-package.mk,v 1.20 2018/10/26 13:49:23 leot Exp $
+# $NetBSD: go-package.mk,v 1.21 2018/11/30 18:38:19 rillig Exp $
#
# This file implements common logic for compiling Go programs in pkgsrc.
#
@@ -92,3 +92,15 @@
${RUN} cd ${WRKDIR}; [ ! -d bin ] || ${PAX} -rw bin ${DESTDIR}${PREFIX}
${RUN} cd ${WRKDIR}; [ ! -d pkg ] || ${PAX} -rw src pkg ${DESTDIR}${PREFIX}/gopkg
.endif
+
+_VARGROUPS+= go
+_PKG_VARS.go= GO_SRCPATH GO_DIST_BASE GO_BUILD_PATTERN
+_USER_VARS.go= GO_VERSION_DEFAULT
+_SYS_VARS.go= GO GO_VERSION GOVERSSUFFIX GOARCH GOCHAR \
+ GOOPT GOTOOLDIR GO_PLATFORM
+_DEF_VARS.go= GO14_VERSION GO19_VERSION GO110_VERSION \
+ GO111_VERSION INSTALLATION_DIRS MAKE_JOBS_SAFE \
+ NOT_FOR_PLATFORM ONLY_FOR_PLATFORM SSP_SUPPORTED \
+ WRKSRC
+_USE_VARS.go= GO_PACKAGE_DEP
+_SORTED_VARS.go= INSTALLATION_DIRS *_FOR_PLATFORM
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/bsd.options.mk
--- a/mk/bsd.options.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/bsd.options.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.options.mk,v 1.73 2016/12/01 15:28:57 wiz Exp $
+# $NetBSD: bsd.options.mk,v 1.74 2018/11/30 18:38:19 rillig Exp $
#
# This Makefile fragment provides boilerplate code for standard naming
# conventions for handling per-package build options.
@@ -164,6 +164,7 @@
PKG_LEGACY_OPTIONS PKG_OPTIONS_DEPRECATED_WARNINGS
_PKG_VARS.options+= PKG_DISABLED_OPTIONS
_SYS_VARS.options= PKG_OPTIONS
+_LISTED_VARS.options= *S *S.*
.include "bsd.prefs.mk"
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/build/bsd.build-vars.mk
--- a/mk/build/bsd.build-vars.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/build/bsd.build-vars.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.build-vars.mk,v 1.12 2017/08/07 23:54:09 maya Exp $
+# $NetBSD: bsd.build-vars.mk,v 1.13 2018/11/30 18:38:19 rillig Exp $
#
# Package-settable variables:
#
@@ -24,6 +24,8 @@
_VARGROUPS+= build-vars
_USER_VARS.build-vars= # none
_PKG_VARS.build-vars= BUILD_DIRS MAKE_ENV MAKE_PROGRAM MAKE_FLAGS MAKE_FILE NO_BUILD
+_LISTED_VARS.build-vars= BUILD_DIRS
+_SORTED_VARS.build-vars= MAKE_ENV MAKE_FLAGS
BUILD_DIRS?= ${CONFIGURE_DIRS}
MAKE_ENV?= # empty
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/build/build.mk
--- a/mk/build/build.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/build/build.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: build.mk,v 1.23 2018/05/16 21:23:02 rillig Exp $
+# $NetBSD: build.mk,v 1.24 2018/11/30 18:38:19 rillig Exp $
#
# This file defines what happens in the build phase, excluding the
# self-test, which is defined in test.mk.
@@ -41,6 +41,8 @@
_USER_VARS.build= MAKE_JOBS BUILD_ENV_SHELL
_PKG_VARS.build= MAKE_ENV MAKE_FLAGS BUILD_MAKE_FLAGS BUILD_TARGET MAKE_JOBS_SAFE
_SYS_VARS.build= BUILD_MAKE_CMD
+_SORTED_VARS.build= *_ENV
+_LISTED_VARS.build= *_FLAGS *_CMD
BUILD_MAKE_FLAGS?= # none
BUILD_TARGET?= all
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/build/test.mk
--- a/mk/build/test.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/build/test.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: test.mk,v 1.19 2018/01/13 12:48:56 joerg Exp $
+# $NetBSD: test.mk,v 1.20 2018/11/30 18:38:19 rillig Exp $
#
# After the "build" phase, many packages provide some sort of self-test
# that can be run on the not-yet installed package. To enable these
@@ -41,6 +41,8 @@
_VARGROUPS+= test
_USER_VARS.test= PKGSRC_RUN_TEST
_PKG_VARS.test= TEST_DIRS TEST_ENV TEST_MAKE_FLAGS MAKE_FILE TEST_TARGET
+_SORTED_VARS.test= *_ENV
+_LISTED_VARS.test= *_DIRS *_FLAGS
TEST_DIRS?= ${BUILD_DIRS}
TEST_ENV+= ${MAKE_ENV}
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/configure/configure.mk
--- a/mk/configure/configure.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/configure/configure.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: configure.mk,v 1.25 2012/06/01 12:52:37 jperkin Exp $
+# $NetBSD: configure.mk,v 1.26 2018/11/30 18:38:19 rillig Exp $
#
# = Package-settable variables =
#
@@ -50,6 +50,8 @@
CONFIGURE_ARGS OVERRIDE_GNU_CONFIG_SCRIPTS HAS_CONFIGURE \
GNU_CONFIGURE PKGCONFIG_OVERRIDE USE_PKGLOCALEDIR \
CMAKE_ARGS CMAKE_ARG_PATH
+_SORTED_VARS.configure= *_ENV *_OVERRIDE
+_LISTED_VARS.configure= *_ARGS *_SCRIPTS
CONFIGURE_SCRIPT?= ./configure
CONFIGURE_ENV+= ${ALL_ENV}
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/extract/bsd.extract-vars.mk
--- a/mk/extract/bsd.extract-vars.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/extract/bsd.extract-vars.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.extract-vars.mk,v 1.16 2013/11/16 07:45:26 shattered Exp $
+# $NetBSD: bsd.extract-vars.mk,v 1.17 2018/11/30 18:38:19 rillig Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -18,6 +18,7 @@
_PKG_VARS.extract= EXTRACT_DIR EXTRACT_ONLY EXTRACT_SUFX EXTRACT_CMD \
EXTRACT_OPTS EXTRACT_USING EXTRACT_ELEMENTS
_SYS_VARS.extract= EXTRACT_CMD_DEFAULT
+_LISTED_VARS.extract= EXTRACT_CMD EXTRACT_CMD_DEFAULT
EXTRACT_ONLY?= ${DISTFILES}
EXTRACT_SUFX?= .tar.gz
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/features/features-vars.mk
--- a/mk/features/features-vars.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/features/features-vars.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: features-vars.mk,v 1.23 2014/07/17 13:07:14 ryoon Exp $
+# $NetBSD: features-vars.mk,v 1.24 2018/11/30 18:38:19 rillig Exp $
#
# The platforms that are supported by pkgsrc differ in the amount of
# functions they provide in the C library (libc). Functions that are
@@ -67,6 +67,7 @@
_USER_VARS.features= # none
_PKG_VARS.features= USE_FEATURES
_SYS_VARS.features= MISSING_FEATURES
+_SORTED_VARS.features= *S
MISSING_FEATURES= # empty
USE_FEATURES?= # none
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/fetch/bsd.fetch-vars.mk
--- a/mk/fetch/bsd.fetch-vars.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/fetch/bsd.fetch-vars.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.fetch-vars.mk,v 1.22 2015/09/13 15:03:57 joerg Exp $
+# $NetBSD: bsd.fetch-vars.mk,v 1.23 2018/11/30 18:38:20 rillig Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -41,6 +41,7 @@
_USER_VARS.fetch= DISTDIR DIST_PATH
_PKG_VARS.fetch= MASTER_SITES DIST_SUBDIR DISTFILES
_SYS_VARS.fetch= DEFAULT_DISTFILES
+_LISTED_VARS.fetch= *S
# The default DISTDIR is currently set in bsd.prefs.mk.
#DISTDIR?= ${PKGSRCDIR}/distfiles
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/fetch/github.mk
--- a/mk/fetch/github.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/fetch/github.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: github.mk,v 1.11 2018/08/01 18:01:32 rillig Exp $
+# $NetBSD: github.mk,v 1.12 2018/11/30 18:38:20 rillig Exp $
#
# github.com master site handling
#
@@ -76,3 +76,4 @@
_PKG_VARS.github= GITHUB_PROJECT GITHUB_TAG GITHUB_TYPE
_DEF_VARS.github= _USE_GITHUB _GITHUB_DEFAULT_DISTFILES SITES.${_GITHUB_DEFAULT_DISTFILES}
_USE_VARS.github= PKGBASE PKGVERSION_NOREV
+_LISTED_VARS.github= SITES.*
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/java-vm.mk
--- a/mk/java-vm.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/java-vm.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: java-vm.mk,v 1.113 2018/09/14 16:01:05 tnn Exp $
+# $NetBSD: java-vm.mk,v 1.114 2018/11/30 18:38:19 rillig Exp $
#
# This Makefile fragment handles Java dependencies and make variables,
# and is meant to be included by packages that require Java either at
@@ -59,6 +59,7 @@
_USER_VARS.java= PKG_JVM_DEFAULT
_PKG_VARS.java= USE_JAVA USE_JAVA2 PKG_JVMS_ACCEPTED
_SYS_VARS.java= PKG_JVM PKG_JAVA_HOME JAVA_BINPREFIX
+_SORTED_VARS.java= PKG_JVMS_ACCEPTED
.include "../../mk/bsd.prefs.mk"
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/license.mk
--- a/mk/license.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/license.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: license.mk,v 1.88 2018/08/10 19:29:04 nia Exp $
+# $NetBSD: license.mk,v 1.89 2018/11/30 18:38:19 rillig Exp $
#
# This file handles everything about the LICENSE variable. It is
# included automatically by bsd.pkg.mk.
@@ -265,3 +265,9 @@
| ${AWK} -F ';' '{ print $$2 }' \
| LC_ALL=C ${SORT} | uniq -c | LC_ALL=C ${SORT} -nr \
| ${AWK} 'BEGIN { printf("%5s %s\n", "Files", "License") } { printf("%5d %s\n", $$1, $$2); }'
+
+_VARGROUPS+= license
+_USER_VARS.license= ACCEPTABLE_LICENSES SKIP_LICENSE_CHECK
+_PKG_VARS.license= LICENSE
+_SYS_VARS.license= DEFAULT_ACCEPTABLE_LICENSES
+_SORTED_VARS.license= *_LICENSES SKIP_*
diff -r cb75c0dcfecb -r 1a17e3f3e521 mk/misc/show.mk
--- a/mk/misc/show.mk Fri Nov 30 18:08:05 2018 +0000
+++ b/mk/misc/show.mk Fri Nov 30 18:38:19 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: show.mk,v 1.16 2018/11/11 19:07:12 rillig Exp $
+# $NetBSD: show.mk,v 1.17 2018/11/30 18:38:20 rillig Exp $
#
# This file contains some targets that print information gathered from
# variables. They do not modify any variables.
@@ -124,6 +124,22 @@
# All variables that are used by this file, whether internal or
# not, primary or not.
#
+# Variables that control the presentation of individual variables:
+#
+# _SORTED_VARS.*
+# A list of patterns describing the variable names to be shown as
+# lists, one word per line, sorted alphabetically.
+#
+# Default: # none
+# Example: *_ENV *_FILES SUBST_VARS.*
+#
+# _LISTED_VARS.*
+# A list of patterns describing the variable names to be shown as
+# lists, one word per line, in the given order.
+#
+# Default: # none
+# Example: *_ARGS *_CMD SUBST_SED.*
+#
_SHOW_ALL_CATEGORIES= _USER_VARS _PKG_VARS _SYS_VARS _USE_VARS _DEF_VARS
_LABEL._USER_VARS= usr
_LABEL._PKG_VARS= pkg
@@ -145,13 +161,12 @@
# doesn't exist.
show-all-${g}: .PHONY
- @echo "${g}:"
+ @${RUN} printf '%s:\n' ${g:Q}
+
. for c in ${_SHOW_ALL_CATEGORIES}
. for v in ${${c}.${g}}
-. if (${v:M*_ENV} \
- || ${v:M*_ENV.*} \
- || ${v} == PLIST_SUBST \
- || ${v:MSUBST_VARS.*})
+
+. if ${_SORTED_VARS.${g}:U:@pattern@ ${v:M${pattern}} @:M*}
# multi-valued variables, values are sorted
${RUN} \
@@ -165,17 +180,7 @@
printf '\t\t\t\t# end of %s (sorted)\n' ${v:Q}; \
fi
-. elif (${v:M*_ARGS} \
- || ${v:M*_ARGS.*} \
- || ${v:M*_CMD} \
- || ${v:M*_CMD_DEFAULT} \
- || ${v:M*_SKIP} \
- || ${v:M*INSTALL_SRC} \
- || ${v:MMASTER_SITE*} \
- || ${v:MSUBST_FILES.*} \
- || ${v:MSUBST_SED.*} \
- || ${v:MSUBST_FILTER_CMD.*} \
- || ${v:M*_SUBST})
+. elif ${_LISTED_VARS.${g}:U:@pattern@ ${v:M${pattern}} @:M*}
Home |
Main Index |
Thread Index |
Old Index