# HG changeset patch # User Tassilo Philipp # Date 1662294552 -7200 # Node ID 4a3fab7712fbd5c6767e9b4b682808f7d98688f8 # Parent a94b985f9a918effaead858ef1aac2497034394a - test/dynload_plain: fix on some sunos platforms selecting libc to test diff -r a94b985f9a91 -r 4a3fab7712fb test/dynload_plain/Makefile.embedded --- a/test/dynload_plain/Makefile.embedded Sun Sep 04 11:28:09 2022 +0200 +++ b/test/dynload_plain/Makefile.embedded Sun Sep 04 14:29:12 2022 +0200 @@ -1,8 +1,11 @@ # path to default libc.so file, easier to do via shell than in code (see main() in dynload_plain.c) # for compat: first gmake style, then assignment op which will use ! as part of var name on gmake<4 -# and thus not override previously set var +# and thus not override previously set var; in a similar vein, the :sh line works on +# sun make flavors and sets the var using sunOS specific deduction if not already set +# (:sh also works on bmake, but != already sets the var) DEF_C_DYLIB=$(shell ((ldd `which ls` | grep -o '/.*/libc.so[^ ]*' || ls /lib*/libc.so* || ls /usr/lib/libc.so*) | grep -v '\.a$$' | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1) DEF_C_DYLIB!=((ldd `which ls` | grep -o '/.*/libc.so[^ ]*' || ls /lib*/libc.so* || ls /usr/lib/libc.so*) | grep -v '\.a$$' | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1 +DEF_C_DYLIB:sh=[ -z "${DEF_C_DYLIB}" ] && ls /lib/`isainfo -b`/libc.so || echo "${DEF_C_DYLIB}" APP = dynload_plain OBJS = dynload_plain.o diff -r a94b985f9a91 -r 4a3fab7712fb test/dynload_plain/Makefile.generic --- a/test/dynload_plain/Makefile.generic Sun Sep 04 11:28:09 2022 +0200 +++ b/test/dynload_plain/Makefile.generic Sun Sep 04 14:29:12 2022 +0200 @@ -1,8 +1,11 @@ # path to default libc.so file, easier to do via shell than in code (see main() in dynload_plain.c) # for compat: first gmake style, then assignment op which will use ! as part of var name on gmake<4 -# and thus not override previously set var +# and thus not override previously set var; in a similar vein, the :sh line works on +# sun make flavors and sets the var using sunOS specific deduction if not already set +# (:sh also works on bmake, but != already sets the var) DEF_C_DYLIB=$(shell ((ldd `which ls` | grep -o '/.*/libc.so[^ ]*' || ls /lib*/libc.so* || ls /usr/lib/libc.so*) | grep -v '\.a$$' | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1) DEF_C_DYLIB!=((ldd `which ls` | grep -o '/.*/libc.so[^ ]*' || ls /lib*/libc.so* || ls /usr/lib/libc.so*) | grep -v '\.a$$' | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1 +DEF_C_DYLIB:sh=[ -z "${DEF_C_DYLIB}" ] && ls /lib/`isainfo -b`/libc.so || echo "${DEF_C_DYLIB}" APP = dynload_plain OBJS = dynload_plain.o