comparison test/dynload_plain/Makefile.embedded @ 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
comparison
equal deleted inserted replaced
567:a94b985f9a91 568:4a3fab7712fb
1 # path to default libc.so file, easier to do via shell than in code (see main() in dynload_plain.c) 1 # path to default libc.so file, easier to do via shell than in code (see main() in dynload_plain.c)
2 # for compat: first gmake style, then assignment op which will use ! as part of var name on gmake<4 2 # for compat: first gmake style, then assignment op which will use ! as part of var name on gmake<4
3 # and thus not override previously set var 3 # and thus not override previously set var; in a similar vein, the :sh line works on
4 # sun make flavors and sets the var using sunOS specific deduction if not already set
5 # (:sh also works on bmake, but != already sets the var)
4 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) 6 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)
5 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 7 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
8 DEF_C_DYLIB:sh=[ -z "${DEF_C_DYLIB}" ] && ls /lib/`isainfo -b`/libc.so || echo "${DEF_C_DYLIB}"
6 9
7 APP = dynload_plain 10 APP = dynload_plain
8 OBJS = dynload_plain.o 11 OBJS = dynload_plain.o
9 TEST_U8_SO = dynload_plain_ß_test # @@@ unsure if every platform handles ß, here (ANSI, UTF-8, ...) 12 TEST_U8_SO = dynload_plain_ß_test # @@@ unsure if every platform handles ß, here (ANSI, UTF-8, ...)
10 13