diff options
author | gavan <gavan@pkgsrc.org> | 2003-12-30 12:09:27 +0000 |
---|---|---|
committer | gavan <gavan@pkgsrc.org> | 2003-12-30 12:09:27 +0000 |
commit | d6c34d9cff5d05957c59b444278a76fbdfcb5ed1 (patch) | |
tree | 370d17d79f15a74ea145d3b4cd76e9e4a46992ae /mk | |
parent | f27fd298e9721dc283049e5cb5fbc8b8764b93ef (diff) | |
download | pkgsrc-d6c34d9cff5d05957c59b444278a76fbdfcb5ed1.tar.gz |
Remove libraries from the output if they don't exist.
ok'd by grant.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/buildlink2/fake-la | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mk/buildlink2/fake-la b/mk/buildlink2/fake-la index 1a24f1567aa..ab90850fd7b 100644 --- a/mk/buildlink2/fake-la +++ b/mk/buildlink2/fake-la @@ -1,6 +1,6 @@ #!@BUILDLINK_SHELL@ # -# $NetBSD: fake-la,v 1.8 2003/12/08 13:38:19 salo Exp $ +# $NetBSD: fake-la,v 1.9 2003/12/30 12:09:27 gavan Exp $ AR="@AR@" AWK="@AWK@" @@ -92,4 +92,17 @@ if ${TEST} ! -f $tmpdir/inst/$libbase.la; then @RESET_LD_SO_CACHE@ >/dev/null 2>&1 fi -${SED} -e "s,$tmpdir/inst,$realdir,g" $tmpdir/inst/$libbase.la + +dlname=`${SED} -n -e"/^dlname='/{ s/^dlname='//; s/'$//; p; };" "$tmpdir/inst/$libbase.la"` +library_names=`${SED} -n -e"/^library_names='/{ s/^library_names='//; s/'$//; p; };" "$tmpdir/inst/$libbase.la"` +old_library=`${SED} -n -e"/^old_library='/{ s/^old_library='//; s/'$//; p; };" "$tmpdir/inst/$libbase.la"` + +for file in $dlname $library_names $old_library +do + if ! [ -e $realdir/$file ] + then + removal_pattern="$removal_pattern -e s,$file\([^.0-9]\),\1,g" + fi +done + +${SED} -e "s,$tmpdir/inst,$realdir,g" $removal_pattern $tmpdir/inst/$libbase.la |