pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/buildlink3 Allow l:foo: to remove -lfoo. Also remo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/76b8e13a02f1
branches:  trunk
changeset: 465835:76b8e13a02f1
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Tue Jan 06 19:08:59 2004 +0000

description:
Allow l:foo: to remove -lfoo.  Also remove an incorrect rule in the "l"
case.

diffstat:

 mk/buildlink3/gen-transform.sh |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r 1dde6cba8b32 -r 76b8e13a02f1 mk/buildlink3/gen-transform.sh
--- a/mk/buildlink3/gen-transform.sh    Tue Jan 06 18:56:50 2004 +0000
+++ b/mk/buildlink3/gen-transform.sh    Tue Jan 06 19:08:59 2004 +0000
@@ -1,6 +1,6 @@
 #!@BUILDLINK_SHELL@
 #
-# $NetBSD: gen-transform.sh,v 1.6 2004/01/06 18:43:10 jlam Exp $
+# $NetBSD: gen-transform.sh,v 1.7 2004/01/06 19:08:59 jlam Exp $
 
 transform="@_BLNK_TRANSFORM_SEDFILE@"
 untransform="@_BLNK_UNTRANSFORM_SEDFILE@"
@@ -94,16 +94,22 @@
                case "$action" in
                transform|untransform)
                        shift
+                       tolibs=
                        fromlib="-l$1"; shift
-                       tolibs="-l$1"; shift
                        while [ $# -gt 0 ]; do
-                               tolibs="$tolibs -l$1"
+                               case $1 in
+                               "")     ;;
+                               *)      case $tolibs in
+                                       "")     tolibs="-l$1" ;;
+                                       *)      tolibs="$tolibs -l$1"
+                                       esac
+                                       ;;
+                               esac
                                shift
                        done
                        @CAT@ >> $sedfile << EOF
 s|$fromlib\([  "':;]\)|$tolibs\1|g
 s|$fromlib$|$tolibs|g
-s|$fromlib/|$tolibs/|g
 EOF
                        ;;
                esac



Home | Main Index | Thread Index | Old Index