summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-08-12 19:29:44 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-08-12 19:29:44 +0000
commite071ba36ae94d9d0029bee5e1049460792d45be7 (patch)
tree862daae471026df9d2dd2be34d82120f6b71dbe4 /tools
parent1d15ebd0d5e47ee00640314c8c357fef97ce1927 (diff)
downloadexecline-e071ba36ae94d9d0029bee5e1049460792d45be7.tar.xz
Link shared libs against their -l deps, better libpath management
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gen-deps.sh14
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"