summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2007-03-15 22:54:24 +0000
committerrillig <rillig@pkgsrc.org>2007-03-15 22:54:24 +0000
commit66bf916302435dd3df36b637e4610b03504253fd (patch)
tree2a6ccf38a6091b29f21c0fce92183621b136e1f9 /mk
parent154c3bb52d5bf34d78ba393838963353ab6e8e6d (diff)
downloadpkgsrc-66bf916302435dd3df36b637e4610b03504253fd.tar.gz
For all those who are interested in the inner workings of pkgsrc, there
is a new target "show-all" that fits to the existing "debug", "show-tools", "show-vars" targets. It prints a list of the variables that make up the public interface to pkgsrc. Running this target is especially useful if you want to do some things, you know that they must have been implemented but you don't know what it is called. It also shows the "class" of a variable (user-defined, package-defined, system-defined).
Diffstat (limited to 'mk')
-rw-r--r--mk/build/bsd.build-vars.mk7
-rw-r--r--mk/build/build.mk7
-rw-r--r--mk/build/test.mk6
-rw-r--r--mk/check/check-perms.mk6
-rw-r--r--mk/configure/configure.mk8
-rw-r--r--mk/configure/gnu-configure.mk9
-rw-r--r--mk/misc/show.mk38
-rw-r--r--mk/subst.mk11
-rw-r--r--mk/tools/bsd.tools.mk24
9 files changed, 107 insertions, 9 deletions
diff --git a/mk/build/bsd.build-vars.mk b/mk/build/bsd.build-vars.mk
index d71374bb3ba..168d510e30e 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.3 2006/09/09 02:35:13 obache Exp $
+# $NetBSD: bsd.build-vars.mk,v 1.4 2007/03/15 22:54:24 rillig Exp $
#
# BUILD_DIRS is the list of directories in which to perform the build
# process. If the directories are relative paths, then they
@@ -18,6 +18,11 @@
# executable. If the path is relative, then it is assumed to
# be relative to each directory listed in BUILD_DIRS.
#
+
+_VARGROUPS+= build-vars
+_USER_VARS.build-vars= # none
+_PKG_VARS.build-vars= BUILD_DIRS MAKE_ENV MAKE_PROGRAM MAKE_FLAGS MAKE_FILE NO_BUILD
+
BUILD_DIRS?= ${CONFIGURE_DIRS}
MAKE_PROGRAM?= ${MAKE}
MAKE_ENV?= # empty
diff --git a/mk/build/build.mk b/mk/build/build.mk
index 1cf0a06ad57..11ee4176314 100644
--- a/mk/build/build.mk
+++ b/mk/build/build.mk
@@ -1,4 +1,4 @@
-# $NetBSD: build.mk,v 1.10 2007/03/08 23:16:06 rillig Exp $
+# $NetBSD: build.mk,v 1.11 2007/03/15 22:54:24 rillig Exp $
#
# This file defines what happens in the build phase, excluding the
# self-test, which is defined in test.mk.
@@ -28,6 +28,11 @@
# mk/build/test.mk
#
+_VARGROUPS+= build
+_USER_VARS.build= MAKE_JOBS BUILD_ENV_SHELL
+_PKG_VARS.build= BUILD_MAKE_FLAGS BUILD_TARGET MAKE_JOBS_SAFE
+_SYS_VARS.build= BUILD_MAKE_CMD
+
BUILD_MAKE_FLAGS?= # none
BUILD_TARGET?= all
diff --git a/mk/build/test.mk b/mk/build/test.mk
index 5f08535c4ce..d66ad8256d4 100644
--- a/mk/build/test.mk
+++ b/mk/build/test.mk
@@ -1,4 +1,4 @@
-# $NetBSD: test.mk,v 1.11 2007/01/28 15:29:11 rillig Exp $
+# $NetBSD: test.mk,v 1.12 2007/03/15 22:54:24 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
@@ -33,6 +33,10 @@
# Keywords: test check
#
+_VARGROUPS+= test
+_USER_VARS.test= PKGSRC_RUN_TEST
+_PKG_VARS.test= TEST_DIRS TEST_ENV TEST_MAKE_FLAGS MAKE_FILE TEST_TARGET
+
TEST_DIRS?= ${BUILD_DIRS}
TEST_ENV+= ${MAKE_ENV}
TEST_MAKE_FLAGS?= # none
diff --git a/mk/check/check-perms.mk b/mk/check/check-perms.mk
index 62f99539f5a..056238625d6 100644
--- a/mk/check/check-perms.mk
+++ b/mk/check/check-perms.mk
@@ -1,4 +1,4 @@
-# $NetBSD: check-perms.mk,v 1.7 2007/03/08 22:49:05 rillig Exp $
+# $NetBSD: check-perms.mk,v 1.8 2007/03/15 22:54:24 rillig Exp $
#
# This file checks that after installation of a package, all files and
# directories of that package have sensible permissions set.
@@ -31,6 +31,10 @@
# Possible values: yes, no.
#
+_VARGROUPS+= check-perms
+_USER_VARS.check-perms= CHECK_PERMS
+_PKG_VARS.check-perms= CHECK_PERMS_SKIP CHECK_PERMS_AUTOSKIP
+
.if defined(PKG_DEVELOPER)
CHECK_PERMS?= yes
.else
diff --git a/mk/configure/configure.mk b/mk/configure/configure.mk
index 48364f2b907..4166ba62f7e 100644
--- a/mk/configure/configure.mk
+++ b/mk/configure/configure.mk
@@ -1,4 +1,4 @@
-# $NetBSD: configure.mk,v 1.16 2007/03/15 11:20:40 rillig Exp $
+# $NetBSD: configure.mk,v 1.17 2007/03/15 22:54:24 rillig Exp $
#
# = Package-settable variables =
#
@@ -34,6 +34,12 @@
# Keywords: config.guess config.sub
#
+_VARGROUPS+= configure
+_USER_VARS.configure= CONFIG_SHELL_FLAGS
+_PKG_VARS.configure= CONFIGURE_ENV CONFIG_SHELL CONFIGURE_SCRIPT \
+ CONFIGURE_ARGS OVERRIDE_GNU_CONFIG_SCRIPTS HAS_CONFIGURE \
+ GNU_CONFIGURE PKGCONFIG_OVERRIDE USE_PKGLOCALEDIR
+
CONFIGURE_SCRIPT?= ./configure
CONFIGURE_ENV+= ${ALL_ENV}
CONFIGURE_ARGS?= # empty
diff --git a/mk/configure/gnu-configure.mk b/mk/configure/gnu-configure.mk
index 1af69305ba3..a38eb063045 100644
--- a/mk/configure/gnu-configure.mk
+++ b/mk/configure/gnu-configure.mk
@@ -1,4 +1,11 @@
-# $NetBSD: gnu-configure.mk,v 1.2 2007/03/15 11:20:40 rillig Exp $
+# $NetBSD: gnu-configure.mk,v 1.3 2007/03/15 22:54:24 rillig Exp $
+
+_VARGROUPS+= gnu-configure
+_USER_VARS.gnu-configure= # none
+_PKG_VARS.gnu-configure= GNU_CONFIGURE GNU_CONFIGURE_PREFIX \
+ GNU_CONFIGURE_INFODIR GNU_CONFIGURE_MANDIR \
+ CONFIGURE_HAS_MANDIR CONFIGURE_HAS_INFODIR \
+ USE_GNU_CONFIGURE_HOST
HAS_CONFIGURE= defined
OVERRIDE_GNU_CONFIG_SCRIPTS= defined
diff --git a/mk/misc/show.mk b/mk/misc/show.mk
index cbe21c0ea07..5ce24c8fb2f 100644
--- a/mk/misc/show.mk
+++ b/mk/misc/show.mk
@@ -1,4 +1,4 @@
-# $NetBSD: show.mk,v 1.1 2007/01/02 21:29:07 rillig Exp $
+# $NetBSD: show.mk,v 1.2 2007/03/15 22:54:24 rillig Exp $
#
# This file contains some targets that print information gathered from
# variables. They do not modify any variables.
@@ -65,3 +65,39 @@ show-build-defs: .PHONY
# @deprecated -- remove after 2007Q1
build-defs-message: show-build-defs .PHONY
+
+# show-all:
+# Prints a list of (hopefully) all pkgsrc variables that are visible
+# to the user or the package developer. It is intended to give
+# interested parties a better insight into the inner workings of
+# pkgsrc.
+#
+# Keywords: debug show
+#
+
+_LETTER._USER_VARS= U
+_LETTER._PKG_VARS= P
+_LETTER._SYS_VARS= S
+
+show-all: .PHONY
+.for g in ${_VARGROUPS:O:u}
+
+show-all: show-all-${g}
+
+show-all-${g}: .PHONY
+ @echo "${g}:"
+. for c in _USER_VARS _PKG_VARS _SYS_VARS
+. for v in ${${c}.${g}}
+. if defined(${v})
+. if empty(${v}:M*)
+ @echo " ${_LETTER.${c}} ${v} (defined, but empty)"
+. else
+ @echo " ${_LETTER.${c}} ${v} = "${${v}:Q}
+. endif
+. else
+ @echo " ${_LETTER.${c}} ${v} (undefined)"
+. endif
+. endfor
+. endfor
+ @echo ""
+.endfor
diff --git a/mk/subst.mk b/mk/subst.mk
index 24c06e99a6c..5d2660d3b3f 100644
--- a/mk/subst.mk
+++ b/mk/subst.mk
@@ -1,4 +1,4 @@
-# $NetBSD: subst.mk,v 1.44 2007/03/07 21:27:59 rillig Exp $
+# $NetBSD: subst.mk,v 1.45 2007/03/15 22:54:24 rillig Exp $
#
# This Makefile fragment implements a general text replacement facility.
# Package makefiles define a ``class'', for each of which a particular
@@ -49,6 +49,15 @@
# Keywords: subst
#
+_VARGROUPS+= subst
+_PKG_VARS.subst= SUBST_CLASSES
+.for c in ${SUBST_CLASSES}
+. for pv in SUBST_STAGE SUBST_MESSAGE SUBST_FILES SUBST_SED SUBST_VARS \
+ SUBST_FILTER_CMD SUBST_POSTCMD SUBST_SKIP_TEXT_CHECK
+_PKG_VARS.subst+= ${pv}.${c}
+. endfor
+.endfor
+
ECHO_SUBST_MSG?= ${STEP_MSG}
# _SUBST_IS_TEXT_FILE returns 0 if $${file} is a text file.
diff --git a/mk/tools/bsd.tools.mk b/mk/tools/bsd.tools.mk
index 8fc9515933b..2adb854c9dc 100644
--- a/mk/tools/bsd.tools.mk
+++ b/mk/tools/bsd.tools.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.46 2006/12/15 12:46:24 martti Exp $
+# $NetBSD: bsd.tools.mk,v 1.47 2007/03/15 22:54:25 rillig Exp $
#
# Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -162,3 +162,25 @@ post-tools:
.include "${PKGSRCDIR}/mk/tools/make.mk"
.include "${PKGSRCDIR}/mk/tools/create.mk"
+
+_VARGROUPS+= tools
+_USER_VARS.tools= TOOLS_SHELL
+_PKG_VARS.tools= USE_TOOLS TOOLS_BROKEN TOOLS_CREATE \
+ TOOLS_FAIL TOOLS_GNU_MISSING TOOLS_NOOP
+.for t in ${USE_TOOLS:C/:.*//} # XXX: There should be a variable _ALL_TOOLS
+. for pv in \
+ TOOLS_ALIASES \
+ TOOLS_ARGS \
+ TOOLS_CMD \
+ TOOLS_DEPENDS \
+ TOOLS_IGNORE \
+ TOOLS_PATH \
+ TOOLS_PLATFORM \
+ TOOLS_PREFIX \
+ TOOLS_SCRIPT \
+ TOOLS_SCRIPT_DFLT \
+ TOOLS_VALUE_GNU \
+ # nil
+_SYS_VARS.tools+= ${pv}.${t}
+. endfor
+.endfor