]> git.saurik.com Git - apple/dyld.git/blobdiff - unit-tests/test-cases/dlopen-LD_LIBRARY_PATH/Makefile
dyld-239.4.tar.gz
[apple/dyld.git] / unit-tests / test-cases / dlopen-LD_LIBRARY_PATH / Makefile
index 6a3e391617ce41767ec5dfd2d100db8d05309124..dddef710e7172312ab8dd4c8af647bb0b7b4c446 100644 (file)
@@ -23,6 +23,7 @@
 TESTROOT = ../..
 include ${TESTROOT}/include/common.makefile
 
+PWD = $(shell pwd)
 
 #
 # tests combinations of dlopen() and LD_LIBRARY_PATH
@@ -37,13 +38,15 @@ include ${TESTROOT}/include/common.makefile
 # 6) fullpath and LD_LIBRARY_PATH set to alt
 #
 
-run: all
+all-check: all check
+
+check:
        cd alt1 && ../main "libfoo.dylib" 1 "leafname found in cwd"
        ./main "./alt1/libfoo.dylib" 1 "relative path"
-       ./main "`pwd`/alt2/libfoo.dylib" 2 "fullpath"
-       export LD_LIBRARY_PATH="`pwd`/alt1" && ./main "libfoo.dylib" 1 "leafname and LD_LIBRARY_PATH overrides cwd"
-       export LD_LIBRARY_PATH="`pwd`/alt1" && cd alt3 && ../main "libfoo.dylib" 1 "leafname and alt LD_LIBRARY_PATH"
-       export LD_LIBRARY_PATH="`pwd`/alt1" && ./main "`pwd`/alt2/libfoo.dylib" 2 "fullpath and LD_LIBRARY_PATH"
+       ./main "${PWD}/alt2/libfoo.dylib" 2 "fullpath"
+       export LD_LIBRARY_PATH="${PWD}/alt1" && ./main "libfoo.dylib" 1 "leafname and LD_LIBRARY_PATH overrides cwd"
+       export LD_LIBRARY_PATH="${PWD}/alt1" && cd alt3 && ../main "libfoo.dylib" 1 "leafname and alt LD_LIBRARY_PATH"
+       export LD_LIBRARY_PATH="${PWD}/alt1" && ./main "${PWD}/alt2/libfoo.dylib" 2 "fullpath and LD_LIBRARY_PATH"
 
 all: main alt1/libfoo.dylib alt2/libfoo.dylib alt3
 
@@ -53,14 +56,14 @@ main : main.c libfoo.dylib
 
 alt1/libfoo.dylib : foo.c
        mkdir -p alt1
-       ${CC} ${CCFLAGS} -dynamiclib foo.c -o "`pwd`/alt1/libfoo.dylib" -DVALUE=1
+       ${CC} ${CCFLAGS} -dynamiclib foo.c -o "${PWD}/alt1/libfoo.dylib" -DVALUE=1
 
 alt2/libfoo.dylib : foo.c
        mkdir -p alt2
-       ${CC} ${CCFLAGS} -dynamiclib foo.c -o "`pwd`/alt2/libfoo.dylib" -DVALUE=2
+       ${CC} ${CCFLAGS} -dynamiclib foo.c -o "${PWD}/alt2/libfoo.dylib" -DVALUE=2
 
 libfoo.dylib : foo.c
-       ${CC} ${CCFLAGS} -dynamiclib foo.c -o "`pwd`/libfoo.dylib" -DVALUE=0
+       ${CC} ${CCFLAGS} -dynamiclib foo.c -o "${PWD}/libfoo.dylib" -DVALUE=0
 
 alt3 :
        mkdir -p alt3