diff test/dynload_plain/Makefile.generic @ 274:5c8eb8f34ae6

- more make compat fixes for test/dynload_plain
author Tassilo Philipp
date Sat, 30 Dec 2017 00:36:00 +0100
parents 883e15fca895
children 483581921af2
line wrap: on
line diff
--- a/test/dynload_plain/Makefile.generic	Fri Dec 29 23:38:35 2017 +0100
+++ b/test/dynload_plain/Makefile.generic	Sat Dec 30 00:36:00 2017 +0100
@@ -1,8 +1,8 @@
 # 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
-DEF_C_DYLIB=$(shell ls /lib*/libc.so* | sort -V -r | head -1)
-DEF_C_DYLIB!=ls /lib*/libc.so* | sort -V -r | head -1
+DEF_C_DYLIB=$(shell ((ls /lib*/libc.so* || ls /usr/lib/libc.so*) | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1)
+DEF_C_DYLIB!=((ls /lib*/libc.so* || ls /usr/lib/libc.so*) | (sort -V -r || sort -t . -n -k 2)) 2>/dev/null | head -1
 
 APP       = dynload_plain
 OBJS      = dynload_plain.o