diff options
author | jlam <jlam@pkgsrc.org> | 2004-01-06 19:08:59 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-01-06 19:08:59 +0000 |
commit | 8566a014187afba2ddd20a079ee33357d0728daa (patch) | |
tree | 564b0c5b3780d8dd8b69f9ecd5382efce83c8231 /mk | |
parent | bc2087b67d9068d777611f7faf3d384f9d07100d (diff) | |
download | pkgsrc-8566a014187afba2ddd20a079ee33357d0728daa.tar.gz |
Allow l:foo: to remove -lfoo. Also remove an incorrect rule in the "l"
case.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink3/gen-transform.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mk/buildlink3/gen-transform.sh b/mk/buildlink3/gen-transform.sh index 28078de8b99..eda9de92ca9 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.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 @@ EOF 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 |