diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2015-08-12 19:58:58 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2015-08-12 19:58:58 +0000 |
commit | 1c0891effd8cc41d8c9453ef4f2a39f00c49ad9d (patch) | |
tree | fed084a1dbc410338c0b30646c7eef2e8b49972d /tools | |
parent | cdb3e48c94eaf206438bd69a269eda360b92b2fc (diff) | |
download | s6-portable-utils-1c0891effd8cc41d8c9453ef4f2a39f00c49ad9d.tar.gz s6-portable-utils-1c0891effd8cc41d8c9453ef4f2a39f00c49ad9d.tar.xz s6-portable-utils-1c0891effd8cc41d8c9453ef4f2a39f00c49ad9d.zip |
Link shared libs against their -l deps, better libpath management v2.0.5.1
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/gen-deps.sh | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/gen-deps.sh b/tools/gen-deps.sh index 1ca66ea..f8cf5ee 100755 --- a/tools/gen-deps.sh +++ b/tools/gen-deps.sh @@ -57,11 +57,17 @@ echo for dir in $(ls -1 src | grep -v ^include) ; do for file in $(ls -1 src/$dir/deps-lib) ; do deps= + libs= while read dep ; do - deps="$deps src/$dir/$dep" + if echo $dep | grep -q -e ^-l -e '^\${.*_LIB}' ; then + libs="$libs $dep" + else + deps="$deps src/$dir/$dep" + fi done < src/$dir/deps-lib/$file - echo "lib$file.a.xyzzy: $deps" - echo "lib${file}.so.xyzzy: $(echo "$deps" | sed 's/\.o/.lo/g')" + echo "lib${file}.a.xyzzy:$deps" + echo "lib${file}.so.xyzzy: private EXTRA_LIBS :=$libs" + echo "lib${file}.so.xyzzy:$(echo "$deps" | sed 's/\.o/.lo/g')" done for file in $(ls -1 src/$dir/deps-exe) ; do @@ -71,7 +77,7 @@ for dir in $(ls -1 src | grep -v ^include) ; do if echo $dep | grep -q -- \\.o$ ; then dep="src/$dir/$dep" fi - if echo $dep | grep -q '^\${.*_LIB}' ; then + if echo $dep | grep -q -- '^\${.*_LIB}' ; then libs="$libs $dep" else deps="$deps $dep" |