summaryrefslogtreecommitdiff
path: root/mk/tools
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-05-09 20:50:20 +0000
committerrillig <rillig@pkgsrc.org>2020-05-09 20:50:20 +0000
commitc50b9583a2617df6370d79b2e1ec2e847e486218 (patch)
tree66f9396203830075f4d190edff7bc81ac28dad20 /mk/tools
parent76cb94d16f406e87946370282d6dbd7346ebf507 (diff)
downloadpkgsrc-c50b9583a2617df6370d79b2e1ec2e847e486218.tar.gz
mk/tools/create.mk: add new variable TOOLS_ALWAYS_WRAP for debugging
Diffstat (limited to 'mk/tools')
-rw-r--r--mk/tools/create.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/mk/tools/create.mk b/mk/tools/create.mk
index 719bce97a34..4ca4948bba6 100644
--- a/mk/tools/create.mk
+++ b/mk/tools/create.mk
@@ -1,4 +1,4 @@
-# $NetBSD: create.mk,v 1.11 2019/03/24 11:29:19 rillig Exp $
+# $NetBSD: create.mk,v 1.12 2020/05/09 20:50:20 rillig Exp $
#
# Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -79,6 +79,14 @@
# TOOLS_FAIL is a list of tools that return false and record their
# call in the .warning directory, which is later shown.
#
+# User-settable variables:
+#
+# TOOLS_ALWAYS_WRAP
+# If defined, all tools are wrapped using a small shell program,
+# even if a symlink were sufficient. This will record all
+# invocations of the tools in the work log (.work.log by default).
+# It makes the tool invocations slower and is therefore only
+# useful during a debugging session.
######################################################################
@@ -160,7 +168,7 @@ ${TOOLS_CMD.${_t_}}:
logmain=${TOOLS_PATH.${_t_}:Q:Q}\"\ \"${TOOLS_ARGS.${_t_}:Q:Q}; \
logsuffix='$$shquoted_args'; \
else \
- case ${TOOLS_PATH.${_t_}:Q}"" in \
+ case ${TOOLS_ALWAYS_WRAP:Dwrap}${TOOLS_PATH.${_t_}:Q}"" in \
/*) create=symlink ;; \
*) create=wrapper; \
script=${TOOLS_SCRIPT_DFLT.${_t_}:Q}; \