Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk/tools mk/tools/create.mk: add new variable TOOLS_AL...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b3395df988bf
branches:  trunk
changeset: 431162:b3395df988bf
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat May 09 20:50:20 2020 +0000

description:
mk/tools/create.mk: add new variable TOOLS_ALWAYS_WRAP for debugging

diffstat:

 mk/tools/create.mk |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r 039acd9749ad -r b3395df988bf mk/tools/create.mk
--- a/mk/tools/create.mk        Sat May 09 20:47:26 2020 +0000
+++ b/mk/tools/create.mk        Sat May 09 20:50:20 2020 +0000
@@ -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 @@
                        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};   \



Home | Main Index | Thread Index | Old Index