summaryrefslogtreecommitdiff
path: root/mk/wrapper/logic
diff options
context:
space:
mode:
authorjlam <jlam>2005-01-10 03:40:25 +0000
committerjlam <jlam>2005-01-10 03:40:25 +0000
commit1cc6aa0b78443ff8e00b4ce5eb122005bc71988f (patch)
treee70ec9c5d07abca784b4fe600349a9d4076fb808 /mk/wrapper/logic
parentfdc4e26c0192952067582b81e065ac4d8cafcf54 (diff)
downloadpkgsrc-1cc6aa0b78443ff8e00b4ce5eb122005bc71988f.tar.gz
Avoid the silly optimization in the make logic and push it into the
shell script instead. We can't avoid invoking sed at least once since we need to protect the arguments against shell expansion, but we avoid invoking sed for transformations unless there actually are transformations to perform. The code is simpler, more straightforward, and logically correct now. This fixes problems with using a non-GCC compiler with packages that haven't been converted to use buildlink3, noted in PR pkg/28896.
Diffstat (limited to 'mk/wrapper/logic')
-rw-r--r--mk/wrapper/logic13
1 files changed, 9 insertions, 4 deletions
diff --git a/mk/wrapper/logic b/mk/wrapper/logic
index d30e31d4a03..23835dd3c9f 100644
--- a/mk/wrapper/logic
+++ b/mk/wrapper/logic
@@ -1,4 +1,4 @@
-# $NetBSD: logic,v 1.7 2004/12/05 03:43:18 jlam Exp $
+# $NetBSD: logic,v 1.8 2005/01/10 03:40:25 jlam Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -216,9 +216,14 @@ while ! queue_is_empty argbuf; do
shquote "$arg"; cachearg="$shquoted"
case $arg in
-*|/*)
- arg=`$echo "X$arg" | $Xsed $transform_sed`
- $debug_log $wrapperlog " (logic) to: $arg"
- addtocache=yes
+ case $transform_sed in
+ "") ;;
+ *)
+ arg=`$echo "X$arg" | $Xsed $transform_sed`
+ $debug_log $wrapperlog " (logic) to: $arg"
+ addtocache=yes
+ ;;
+ esac
;;
*)
$debug_log $wrapperlog " (logic) to: $arg [untransformed]"