Mercurial > pub > dyncall > dyncall
diff test/dynload_plain/Makefile.generic @ 569:7e00c173519d
- test/dynload_plain: make build deduce native libc to use for testing from more elemental tool (using [(1) now instead of ls(1), reason is that on some x64 sunos platforms, ls is 32bit; yes, hacky fix)
author | Tassilo Philipp |
---|---|
date | Sun, 04 Sep 2022 15:28:13 +0200 |
parents | 4a3fab7712fb |
children | 3155ccc33cae |
line wrap: on
line diff
--- a/test/dynload_plain/Makefile.generic Sun Sep 04 14:29:12 2022 +0200 +++ b/test/dynload_plain/Makefile.generic Sun Sep 04 15:28:13 2022 +0200 @@ -3,8 +3,8 @@ # 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=$(shell ((ldd `which [` | 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 [` | 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