aboutsummaryrefslogtreecommitdiffstats
path: root/tools/gen-deps.sh
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2025-04-27 19:00:05 +0000
committerLaurent Bercot <ska@appnovation.com>2025-04-27 19:00:05 +0000
commit7f6dabcd0c10f8dd0ab7828722543fa23478dba5 (patch)
treeeff5c940a0b2a21aaaba1e45d8785085c2627338 /tools/gen-deps.sh
parent74076f00bb2676a7b1f579595edff6c9b05728ab (diff)
downloads6-rc-7f6dabcd0c10f8dd0ab7828722543fa23478dba5.tar.gz
Prepare for 0.5.6.0, add pkg-config support, etc.
Signed-off-by: Laurent Bercot <ska@appnovation.com>
Diffstat (limited to 'tools/gen-deps.sh')
-rwxr-xr-xtools/gen-deps.sh17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/gen-deps.sh b/tools/gen-deps.sh
index befe021..9e18eb1 100755
--- a/tools/gen-deps.sh
+++ b/tools/gen-deps.sh
@@ -61,20 +61,23 @@ for dir in $(ls -1 src | grep -v ^include) ; do
deps=
libs=
while read dep ; do
- if echo $dep | grep -q -e ^-l -e '^\${.*_LIB}' ; then
+ if echo $dep | grep -q -e '^-l' -e '^\${.*_LIB}' ; then
libs="$libs $dep"
+ elif echo $dep | grep -q '^\${LIB' ; then
+ deps="$deps $dep"
else
deps="$deps src/$dir/$dep"
fi
done < src/$dir/deps-lib/$file
echo 'ifeq ($(strip $(STATIC_LIBS_ARE_PIC)),)'
- echo "lib${file}.a.xyzzy:$deps"
+ echo "lib${file}.a.xyzzy:${deps}"
echo else
- echo "lib${file}.a.xyzzy:$(echo "$deps" | sed 's/\.o/.lo/g')"
+ echo "lib${file}.a.xyzzy:$(echo ${deps} | sed 's/\.o/.lo/g')"
echo endif
- if grep -E "^LIB_DEFS [+:]=" package/targets.mak | grep -qF "$file" ; then
+ if grep -qE "^LIB_DEFS [+:]= .*=$file" package/targets.mak ; then
+ echo "lib${file}.pc: EXTRA_LIBS :=${libs}"
echo "lib${file}.so.xyzzy: EXTRA_LIBS :=$libs"
- echo "lib${file}.so.xyzzy:$(echo "$deps" | sed 's/\.o/.lo/g')"
+ echo "lib${file}.so.xyzzy:$(echo ${deps} | sed 's/\.o/.lo/g')"
else
internal_libs="$internal_libs lib${file}.a.xyzzy"
fi
@@ -84,10 +87,10 @@ for dir in $(ls -1 src | grep -v ^include) ; do
deps=
libs=
while read dep ; do
- if echo $dep | grep -q -- \\.o$ ; then
+ if echo $dep | grep -q \\.o$ ; then
dep="src/$dir/$dep"
fi
- if echo $dep | grep -q -e ^-l -e '^\${.*_LIB}' ; then
+ if echo $dep | grep -qx '\${.*_LIB}' ; then
libs="$libs $dep"
else
deps="$deps $dep"