summaryrefslogtreecommitdiff
path: root/mk/wrapper
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2006-11-30 12:11:48 +0000
committerrillig <rillig@pkgsrc.org>2006-11-30 12:11:48 +0000
commit210a6099390a3fdc11c2b71deef6b759418021bd (patch)
treed87bec4b2f474d1e489ea5bb4629acb77804f2b9 /mk/wrapper
parent6699f1b584238c9c995fde76e3531faaedbd97bc (diff)
downloadpkgsrc-210a6099390a3fdc11c2b71deef6b759418021bd.tar.gz
Removed the transform_to_nocache() function, since it is unused.
When discarding arguments, split_arg is set to yes, so that no empty arguments are added to the resulting command line. A more informative debugging message is also printed in that case. Added a debugging message to transform_to(), for consistency with the other functions.
Diffstat (limited to 'mk/wrapper')
-rw-r--r--mk/wrapper/wrapper-subr.sh17
1 files changed, 7 insertions, 10 deletions
diff --git a/mk/wrapper/wrapper-subr.sh b/mk/wrapper/wrapper-subr.sh
index e5c1296b363..72f82f2f74e 100644
--- a/mk/wrapper/wrapper-subr.sh
+++ b/mk/wrapper/wrapper-subr.sh
@@ -1,4 +1,4 @@
-# $NetBSD: wrapper-subr.sh,v 1.5 2006/11/30 11:40:24 rillig Exp $
+# $NetBSD: wrapper-subr.sh,v 1.6 2006/11/30 12:11:48 rillig Exp $
#
# This file contains shell functions that are useful to the wrapper
# scripts.
@@ -24,28 +24,25 @@ transform_to_and_split() {
split_arg=yes
}
-# usage: transform_to_nocache "newarg"
-transform_to_nocache() {
- arg="$1"
- $debug_log $wrapperlog " ($wrapsubr_name) to: $1"
- addtocache=no
-}
-
# usage: transform_discard
transform_discard() {
- transform_to ""
+ $debug_log $wrapperlog " ($wrapsubr_name) discarded: $arg"
+ arg=""
+ addtocache=yes
+ split_arg=yes
}
# usage: transform_discard_with_warning [warning]
transform_discard_with_warning() {
_warning=${1-"discarding option $arg"}
msg_log "$wrapperlog" "WARNING: [$wrapsubr_name] $_warning"
- transform_to ""
+ transform_discard
addtocache=no
}
# usage: transform_pass
transform_pass() {
+ $debug_log $wrapperlog " ($wrapsubr_name) to: $arg [unchanged]"
addtocache=yes
}