diff options
author | jlam <jlam> | 2004-01-03 20:23:51 +0000 |
---|---|---|
committer | jlam <jlam> | 2004-01-03 20:23:51 +0000 |
commit | 7ba01a2b521402b9cbdd5f2dadd033eb97da0288 (patch) | |
tree | 909c29693f96352506c82950230053b537ac2650 | |
parent | a1af082383c527151788a9a706880f92451ef036 (diff) | |
download | pkgsrc-7ba01a2b521402b9cbdd5f2dadd033eb97da0288.tar.gz |
Extend the "l" command by allowing changing "-lfoo" into "-lbar -lbaz" by
saying "l:foo:bar:baz".
-rw-r--r-- | mk/buildlink3/gen-transform.sh | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/mk/buildlink3/gen-transform.sh b/mk/buildlink3/gen-transform.sh index 046639951f0..348e992602f 100644 --- a/mk/buildlink3/gen-transform.sh +++ b/mk/buildlink3/gen-transform.sh @@ -1,6 +1,6 @@ #!@BUILDLINK_SHELL@ # -# $NetBSD: gen-transform.sh,v 1.3 2003/09/03 16:35:01 jlam Exp $ +# $NetBSD: gen-transform.sh,v 1.4 2004/01/03 20:23:51 jlam Exp $ transform="@_BLNK_TRANSFORM_SEDFILE@" untransform="@_BLNK_UNTRANSFORM_SEDFILE@" @@ -15,7 +15,7 @@ untransform="@_BLNK_UNTRANSFORM_SEDFILE@" # depot:src:dst translates "src/<dir>/" into "dst/" # I:src:dst translates "-Isrc" into "-Idst" # L:src:dst translates "-Lsrc" into "-Ldst" -# l:foo:bar translates "-lfoo" into "-lbar" +# l:foo:bar[:baz1...] translates "-lfoo" into "-lbar [-lbaz...]" # P:src:dst translates "src/libfoo.{a,la}" into # "dst/libfoo.{a,la}" # p:path translates "path/*/libfoo.so" into @@ -95,10 +95,17 @@ EOF l) case "$action" in transform|untransform) + shift + fromlib="-l$1"; shift + tolibs="-l$1"; shift + while [ $# -gt 0 ]; do + tolibs="$tolibs -l$1" + shift + done @CAT@ >> $sedfile << EOF -s|-$1$2\([ "':;]\)|-$1$3\1|g -s|-$1$2$|-$1$3|g -s|-$1$2/|-$1$3/|g +s|$fromlib\([ "':;]\)|$tolibs\1|g +s|$fromlib|$tolibs|g +s|$fromlib/|$tolibs/|g EOF ;; esac |