Mercurial > pub > dyncall > dyncall
changeset 568:4a3fab7712fb
- test/dynload_plain: fix on some sunos platforms selecting libc to test
author | Tassilo Philipp |
---|---|
date | Sun, 04 Sep 2022 14:29:12 +0200 |
parents | a94b985f9a91 |
children | 7e00c173519d |
files | test/dynload_plain/Makefile.embedded test/dynload_plain/Makefile.generic |
diffstat | 2 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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