summaryrefslogtreecommitdiff
path: root/test/BlocksRuntime/makefile
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2014-02-14 09:47:31 +0000
committerAlexey Samsonov <samsonov@google.com>2014-02-14 09:47:31 +0000
commit28d10da69f52af1b01fbc12fd503621713641500 (patch)
tree76222f9698fdaafdfe23235d18d5ac804ea515d6 /test/BlocksRuntime/makefile
parent08c9d0bc3ac37d7d5def0318a1420e67cca53e41 (diff)
Move tests for BlocksRuntime and builtins to corresponding directories under test/
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@201396 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/BlocksRuntime/makefile')
-rw-r--r--test/BlocksRuntime/makefile70
1 files changed, 70 insertions, 0 deletions
diff --git a/test/BlocksRuntime/makefile b/test/BlocksRuntime/makefile
new file mode 100644
index 000000000..2734bcae3
--- /dev/null
+++ b/test/BlocksRuntime/makefile
@@ -0,0 +1,70 @@
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+CCDIR=/usr/bin
+#CCDIR=/Volumes/Keep/gcc/usr/bin
+
+all: std
+
+clean:
+ rm -fr *.dSYM *.o *-bin testfilerunner
+
+TFR = ~public/bin/testfilerunner
+
+testfilerunner: testfilerunner.h testfilerunner.m
+ gcc -fobjc-gc-only -g -arch x86_64 -arch i386 -std=gnu99 testfilerunner.m -o testfilerunner -framework Foundation
+
+tests:
+ grep CONFIG *.[cmCM] | $(TFR) $(CCDIR) --
+
+open:
+ grep CONFIG *.[cmCM] | $(TFR) $(CCDIR) -open --
+
+fast:
+ grep CONFIG *.[cmCM] | $(TFR) -fast $(CCDIR) --
+
+std:
+ grep CONFIG *.[cmCM] | $(TFR) --
+
+clang:
+ grep CONFIG *.[cmCM] | $(TFR) -clang -fast --
+
+fastd:
+ grep CONFIG *.[cmCM] | $(TFR) -fast --
+
+
+# Hack Alert: arguably most of the following belongs in libclosure's Makefile; sticking it here until I get around to grokking what goes on in that file.
+sudid:
+ @echo Enabling sudo: # Hack Alert: enable sudo first thing so we don't hang at the password prompt later
+ @sudo echo Thanks
+
+
+RootsDirectory ?= /tmp/
+# Note: the libsystem project (built by the libsystemroot target below) uses the ALTUSRLOCALLIBSYSTEM variable, so we use it here to maintain parity
+ALTUSRLOCALLIBSYSTEM ?= $(RootsDirectory)/alt-usr-local-lib-system/
+altusrlocallibsystem:
+ ditto /usr/local/lib/system $(ALTUSRLOCALLIBSYSTEM) # FIXME: conditionalize this copy
+
+
+# <rdar://problem/6456031> ER: option to not require extra privileges (-nosudo or somesuch)
+Buildit ?= ~rc/bin/buildit -rootsDirectory $(RootsDirectory) -arch i386 -arch ppc -arch x86_64
+blocksroot: sudid clean altusrlocallibsystem
+ sudo $(Buildit) ..
+ ditto $(RootsDirectory)/libclosure.roots/libclosure~dst/usr/local/lib/system $(ALTUSRLOCALLIBSYSTEM)
+
+
+LibsystemVersion ?= 121
+LibsystemPath ?= ~rc/Software/SnowLeopard/Projects/Libsystem/Libsystem-$(LibsystemVersion)
+LibsystemTmpPath ?= $(RootsDirectory)/Libsystem-$(LibsystemVersion)
+libsystemroot: blocksroot
+ ditto $(LibsystemPath) $(LibsystemTmpPath) # FIXME: conditionalize this copy
+ sudo ALTUSRLOCALLIBSYSTEM=$(ALTUSRLOCALLIBSYSTEM) $(Buildit) $(LibsystemTmpPath)
+
+
+# Defaults to product of the libsystemroot target but does not automatically rebuild that, make both targets if you want a fresh root
+LibsystemRootPath ?= $(RootsDirectory)/Libsystem-$(LibsystemVersion).roots/Libsystem-$(LibsystemVersion)~dst/usr/lib/
+roottests:
+ grep CONFIG *.[cmCM] | $(TFR) -dyld $(LibsystemRootPath) -- # FIXME: figure out if I can "call" the std target instead of duplicating it
+