pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/wrapper Avoid the silly optimization in the make lo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f3d2b05b870f
branches:  trunk
changeset: 487137:f3d2b05b870f
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Jan 10 03:40:25 2005 +0000

description:
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:

 mk/wrapper/bsd.wrapper.mk |   6 +-----
 mk/wrapper/logic          |  13 +++++++++----
 2 files changed, 10 insertions(+), 9 deletions(-)

diffs (48 lines):

diff -r 2e2b2b076505 -r f3d2b05b870f mk/wrapper/bsd.wrapper.mk
--- a/mk/wrapper/bsd.wrapper.mk Mon Jan 10 00:15:11 2005 +0000
+++ b/mk/wrapper/bsd.wrapper.mk Mon Jan 10 03:40:25 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.15 2004/12/05 09:29:26 grant Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.16 2005/01/10 03:40:25 jlam Exp $
 #
 # Copyright (c) 2004 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -225,11 +225,7 @@
 _WRAP_SCAN.${_wrappee_}?=              ${_WRAP_SCAN}
 _WRAP_TRANSFORM.${_wrappee_}?=         ${_WRAP_TRANSFORM}
 _WRAP_TRANSFORM_SED.${_wrappee_}?=     ${_WRAP_TRANSFORM_SED}
-.  if !empty(_WRAP_TRANSFORM_SED.${_wrappee_})
-_WRAP_SKIP_TRANSFORM.${_wrappee_}?=    no
-.  else
 _WRAP_SKIP_TRANSFORM.${_wrappee_}?=    ${_WRAP_SKIP_TRANSFORM}
-.  endif
 .endfor        # _WRAPPEES
 
 .if !empty(PKGSRC_COMPILER:Maix-xlc)
diff -r 2e2b2b076505 -r f3d2b05b870f mk/wrapper/logic
--- a/mk/wrapper/logic  Mon Jan 10 00:15:11 2005 +0000
+++ b/mk/wrapper/logic  Mon Jan 10 03:40:25 2005 +0000
@@ -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 @@
                                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]"



Home | Main Index | Thread Index | Old Index