diff options
author | rillig <rillig@pkgsrc.org> | 2018-11-30 18:38:19 +0000 |
---|---|---|
committer | rillig <rillig@pkgsrc.org> | 2018-11-30 18:38:19 +0000 |
commit | 218a3d5f646d57643a4a2acd82a9ab89ed6ac203 (patch) | |
tree | 56b607d224d0bd3b3ed271a39e7fe1e723ac5d5d /mk | |
parent | f729a38ee3ed2297d167ece70820f68a700435a7 (diff) | |
download | pkgsrc-218a3d5f646d57643a4a2acd82a9ab89ed6ac203.tar.gz |
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 (limited to 'mk')
-rw-r--r-- | mk/bsd.options.mk | 3 | ||||
-rw-r--r-- | mk/build/bsd.build-vars.mk | 4 | ||||
-rw-r--r-- | mk/build/build.mk | 4 | ||||
-rw-r--r-- | mk/build/test.mk | 4 | ||||
-rw-r--r-- | mk/configure/configure.mk | 4 | ||||
-rw-r--r-- | mk/extract/bsd.extract-vars.mk | 3 | ||||
-rw-r--r-- | mk/features/features-vars.mk | 3 | ||||
-rw-r--r-- | mk/fetch/bsd.fetch-vars.mk | 3 | ||||
-rw-r--r-- | mk/fetch/github.mk | 3 | ||||
-rw-r--r-- | mk/java-vm.mk | 3 | ||||
-rw-r--r-- | mk/license.mk | 8 | ||||
-rw-r--r-- | mk/misc/show.mk | 39 | ||||
-rw-r--r-- | mk/pkginstall/bsd.pkginstall.mk | 4 | ||||
-rw-r--r-- | mk/pkgtasks/bsd.pkgtasks.mk | 11 | ||||
-rw-r--r-- | mk/plist/plist.mk | 4 | ||||
-rw-r--r-- | mk/subst.mk | 4 | ||||
-rw-r--r-- | mk/tools/bsd.tools.mk | 3 |
17 files changed, 71 insertions, 36 deletions
diff --git a/mk/bsd.options.mk b/mk/bsd.options.mk index cd4637b9964..3a56a2d23a7 100644 --- a/mk/bsd.options.mk +++ b/mk/bsd.options.mk @@ -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_VARS.options= PKG_SUPPORTED_OPTIONS PKG_OPTIONS_VAR \ 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 --git a/mk/build/bsd.build-vars.mk b/mk/build/bsd.build-vars.mk index 987bef679ec..675d03d2a8a 100644 --- a/mk/build/bsd.build-vars.mk +++ b/mk/build/bsd.build-vars.mk @@ -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 --git a/mk/build/build.mk b/mk/build/build.mk index 560cbb66cf8..aa9dbffec9a 100644 --- a/mk/build/build.mk +++ b/mk/build/build.mk @@ -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 @@ _VARGROUPS+= build _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 --git a/mk/build/test.mk b/mk/build/test.mk index 8c79847a875..279b0782296 100644 --- a/mk/build/test.mk +++ b/mk/build/test.mk @@ -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 --git a/mk/configure/configure.mk b/mk/configure/configure.mk index 6ca30bb0b37..6e28631086f 100644 --- a/mk/configure/configure.mk +++ b/mk/configure/configure.mk @@ -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 @@ _PKG_VARS.configure= CONFIGURE_ENV CONFIG_SHELL CONFIGURE_SCRIPT \ 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 --git a/mk/extract/bsd.extract-vars.mk b/mk/extract/bsd.extract-vars.mk index 0cb357b0ed5..5170e445143 100644 --- a/mk/extract/bsd.extract-vars.mk +++ b/mk/extract/bsd.extract-vars.mk @@ -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 @@ _VARGROUPS+= extract _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 --git a/mk/features/features-vars.mk b/mk/features/features-vars.mk index 72edb12aae8..001bf058d87 100644 --- a/mk/features/features-vars.mk +++ b/mk/features/features-vars.mk @@ -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 @@ _VARGROUPS+= features _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 --git a/mk/fetch/bsd.fetch-vars.mk b/mk/fetch/bsd.fetch-vars.mk index 533ecc17d4b..87ba1740707 100644 --- a/mk/fetch/bsd.fetch-vars.mk +++ b/mk/fetch/bsd.fetch-vars.mk @@ -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 @@ _VARGROUPS+= fetch _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 --git a/mk/fetch/github.mk b/mk/fetch/github.mk index 61667f3fb80..da15fe0748e 100644 --- a/mk/fetch/github.mk +++ b/mk/fetch/github.mk @@ -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 @@ _VARGROUPS+= github _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 --git a/mk/java-vm.mk b/mk/java-vm.mk index 1cb37af75fe..2af042c2299 100644 --- a/mk/java-vm.mk +++ b/mk/java-vm.mk @@ -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 @@ _VARGROUPS+= java _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 --git a/mk/license.mk b/mk/license.mk index 7d4a7004552..068803e10d3 100644 --- a/mk/license.mk +++ b/mk/license.mk @@ -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 @@ guess-license: .PHONY | ${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 --git a/mk/misc/show.mk b/mk/misc/show.mk index 8a9f11e0483..28c6ebce011 100644 --- a/mk/misc/show.mk +++ b/mk/misc/show.mk @@ -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 @@ show-build-defs: .PHONY # 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 @@ show-all: show-all-${g} # 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 @@ show-all-${g}: .PHONY 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*} # multi-valued variables, preserving original order ${RUN} \ diff --git a/mk/pkginstall/bsd.pkginstall.mk b/mk/pkginstall/bsd.pkginstall.mk index 93b6230aab5..1c08fdaca1b 100644 --- a/mk/pkginstall/bsd.pkginstall.mk +++ b/mk/pkginstall/bsd.pkginstall.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkginstall.mk,v 1.71 2017/06/14 16:23:09 prlw1 Exp $ +# $NetBSD: bsd.pkginstall.mk,v 1.72 2018/11/30 18:38:20 rillig Exp $ # # This Makefile fragment is included by bsd.pkg.mk and implements the # common INSTALL/DEINSTALL scripts framework. To use the pkginstall @@ -54,6 +54,8 @@ _SYS_VARS.pkginstall= \ SHLIB_TYPE \ LDCONFIG_ADD_CMD \ LDCONFIG_REMOVE_CMD +_LISTED_VARS.pkginstall= *_SRC +_SORTED_VARS.pkginstall= *_SUBST # The Solaris /bin/sh does not know the ${foo#bar} shell substitution. # This shell function serves a similar purpose, but is specialized on diff --git a/mk/pkgtasks/bsd.pkgtasks.mk b/mk/pkgtasks/bsd.pkgtasks.mk index f34bbe39feb..36d570051e1 100644 --- a/mk/pkgtasks/bsd.pkgtasks.mk +++ b/mk/pkgtasks/bsd.pkgtasks.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkgtasks.mk,v 1.8 2017/08/23 17:53:32 jlam Exp $ +# $NetBSD: bsd.pkgtasks.mk,v 1.9 2018/11/30 18:38:20 rillig Exp $ # # Copyright (c) 2017 The NetBSD Foundation, Inc. # All rights reserved. @@ -27,8 +27,6 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -_VARGROUPS+= pkgtasks - # PKG_CONFIG # User-settable variable for whether the directory- and # file-handling should be performed automatically, or if the @@ -84,7 +82,12 @@ _VARGROUPS+= pkgtasks # Possible: yes, no (case-insensitive) # Default: yes # -_USER_VARS.pkgtasks+= PKG_CONFIG PKG_CONFIG_PERMS PKG_INIT_SCRIPTS + +_VARGROUPS+= pkgtasks +_USER_VARS.pkgtasks= PKG_CONFIG PKG_CONFIG_PERMS PKG_INIT_SCRIPTS +_USE_VARS.pkgtasks= FILES_SUBST +_SORTED_VARS.pkgtasks= FILES_SUBST + PKG_CONFIG?= yes PKG_CONFIG_PERMS?= no PKG_CREATE_USERGROUP?= yes diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk index e26d8cda3fd..ed569e06a6e 100644 --- a/mk/plist/plist.mk +++ b/mk/plist/plist.mk @@ -1,4 +1,4 @@ -# $NetBSD: plist.mk,v 1.50 2017/06/14 16:23:09 prlw1 Exp $ +# $NetBSD: plist.mk,v 1.51 2018/11/30 18:38:20 rillig Exp $ # # This Makefile fragment handles the creation of PLISTs for use by # pkg_create(8). @@ -45,6 +45,8 @@ _VARGROUPS+= plist _USER_VARS.plist= # none _PKG_VARS.plist= PLIST_SUBST PLIST_VARS PLIST_SRC GENERATE_PLIST _SYS_VARS.plist= PLIST_TYPE PLIST +_SORTED_VARS.plist= *_SUBST *_VARS +_LISTED_VARS.plist= *_SRC GENERATE_PLIST PLIST_VARS?= # empty PLIST_AWK?= # empty diff --git a/mk/subst.mk b/mk/subst.mk index 3d08f7f3d80..cb9a44b2f4e 100644 --- a/mk/subst.mk +++ b/mk/subst.mk @@ -1,4 +1,4 @@ -# $NetBSD: subst.mk,v 1.57 2018/10/08 20:35:00 rillig Exp $ +# $NetBSD: subst.mk,v 1.58 2018/11/30 18:38:19 rillig Exp $ # # This Makefile fragment implements a general text replacement facility. # Package makefiles define a ``class'', for each of which a particular @@ -63,6 +63,8 @@ _PKG_VARS.subst= SUBST_CLASSES _PKG_VARS.subst+= ${pv}.${c} . endfor .endfor +_SORTED_VARS.subst= SUBST_CLASSES SUBST_FILES.* SUBST_VARS.* +_LISTED_VARS.subst= SUBST_SED.* SUBST_FILTER_CMD.* ECHO_SUBST_MSG?= ${STEP_MSG} diff --git a/mk/tools/bsd.tools.mk b/mk/tools/bsd.tools.mk index 8463ef26aec..68c8757e355 100644 --- a/mk/tools/bsd.tools.mk +++ b/mk/tools/bsd.tools.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.tools.mk,v 1.56 2018/08/22 20:48:37 maya Exp $ +# $NetBSD: bsd.tools.mk,v 1.57 2018/11/30 18:38:20 rillig Exp $ # # Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. # All rights reserved. @@ -181,3 +181,4 @@ _PKG_VARS.tools= USE_TOOLS TOOLS_BROKEN TOOLS_CREATE \ _SYS_VARS.tools+= ${pv}.${t} . endfor .endfor +_SORTED_VARS.tools= USE_TOOLS TOOLS_CREATE TOOLS_GNU_MISSING |