Mercurial > pub > dyncall > dyncall
comparison test/dynload_plain/Makefile.embedded @ 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 |
comparison
equal
deleted
inserted
replaced
568:4a3fab7712fb | 569:7e00c173519d |
---|---|
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; in a similar vein, the :sh line works on | 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 | 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) | 5 # (:sh also works on bmake, but != already sets the var) |
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) | 6 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) |
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 | 7 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 |
8 DEF_C_DYLIB:sh=[ -z "${DEF_C_DYLIB}" ] && ls /lib/`isainfo -b`/libc.so || echo "${DEF_C_DYLIB}" | 8 DEF_C_DYLIB:sh=[ -z "${DEF_C_DYLIB}" ] && ls /lib/`isainfo -b`/libc.so || echo "${DEF_C_DYLIB}" |
9 | 9 |
10 APP = dynload_plain | 10 APP = dynload_plain |
11 OBJS = dynload_plain.o | 11 OBJS = dynload_plain.o |
12 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, ...) |