Chris Lattner | 1467e03 | 2007-07-16 04:35:52 +0000 | [diff] [blame] | 1 | LEVEL = ../../.. |
2 | include $(LEVEL)/Makefile.common | ||||
Reid Spencer | 5f016e2 | 2007-07-11 17:01:13 +0000 | [diff] [blame] | 3 | |
Daniel Dunbar | 0126e5e | 2009-07-12 19:00:20 +0000 | [diff] [blame] | 4 | # Test in all immediate subdirectories if unset. |
Daniel Dunbar | 2f42d4a | 2009-09-04 17:40:27 +0000 | [diff] [blame] | 5 | ifdef TESTSUITE |
6 | TESTDIRS := $(TESTSUITE:%=$(PROJ_SRC_DIR)/%) | ||||
7 | else | ||||
Daniel Dunbar | 10aebbb | 2009-07-25 15:26:08 +0000 | [diff] [blame] | 8 | TESTDIRS ?= $(PROJ_SRC_DIR) |
Daniel Dunbar | 2f42d4a | 2009-09-04 17:40:27 +0000 | [diff] [blame] | 9 | endif |
Chris Lattner | 15bd799 | 2008-03-10 19:32:31 +0000 | [diff] [blame] | 10 | |
Daniel Dunbar | 5e01e3c | 2009-09-22 05:16:02 +0000 | [diff] [blame] | 11 | # 'lit' wants objdir paths, so it will pick up the lit.site.cfg. |
12 | TESTDIRS := $(TESTDIRS:$(PROJ_SRC_DIR)%=$(PROJ_OBJ_DIR)%) | ||||
Daniel Dunbar | 5803331 | 2009-09-10 23:00:15 +0000 | [diff] [blame] | 13 | |
Daniel Dunbar | d5134b0 | 2009-06-13 18:28:48 +0000 | [diff] [blame] | 14 | ifndef TESTARGS |
Chris Lattner | 9d294b9 | 2008-04-06 22:32:01 +0000 | [diff] [blame] | 15 | ifdef VERBOSE |
Daniel Dunbar | d5134b0 | 2009-06-13 18:28:48 +0000 | [diff] [blame] | 16 | TESTARGS = -v |
Mike Stump | 039df91 | 2009-03-13 00:21:49 +0000 | [diff] [blame] | 17 | else |
Daniel Dunbar | d5134b0 | 2009-06-13 18:28:48 +0000 | [diff] [blame] | 18 | TESTARGS = -s |
Mike Stump | 9a2f1ac | 2009-03-18 20:25:18 +0000 | [diff] [blame] | 19 | endif |
Chris Lattner | 9d294b9 | 2008-04-06 22:32:01 +0000 | [diff] [blame] | 20 | endif |
21 | |||||
Nuno Lopes | a7afc45 | 2009-07-11 18:34:43 +0000 | [diff] [blame] | 22 | ifdef VG |
23 | VGARG="--vg" | ||||
24 | else | ||||
25 | VGARG= | ||||
26 | endif | ||||
27 | |||||
Daniel Dunbar | 5803331 | 2009-09-10 23:00:15 +0000 | [diff] [blame] | 28 | all:: lit.site.cfg |
Daniel Dunbar | 724827f | 2009-09-08 16:39:23 +0000 | [diff] [blame] | 29 | @ echo '--- Running clang tests for $(TARGET_TRIPLE) ---' |
Douglas Gregor | b3496c7 | 2009-09-29 14:54:28 +0000 | [diff] [blame] | 30 | @ $(PYTHON) $(LLVM_SRC_ROOT)/utils/lit/lit.py \ |
Daniel Dunbar | 6779647 | 2009-07-27 19:01:13 +0000 | [diff] [blame] | 31 | $(TESTARGS) $(TESTDIRS) $(VGARG) |
Gabor Greif | 17feadf | 2008-03-18 07:03:00 +0000 | [diff] [blame] | 32 | |
Daniel Dunbar | 5803331 | 2009-09-10 23:00:15 +0000 | [diff] [blame] | 33 | FORCE: |
34 | |||||
35 | lit.site.cfg: FORCE | ||||
Daniel Dunbar | 1b720a9 | 2009-09-20 19:04:35 +0000 | [diff] [blame] | 36 | @echo "Making Clang 'lit.site.cfg' file..." |
37 | @sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \ | ||||
38 | -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \ | ||||
Daniel Dunbar | 7af18d3 | 2009-09-17 19:55:53 +0000 | [diff] [blame] | 39 | -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \ |
Daniel Dunbar | 9e10cc7 | 2009-09-26 07:36:09 +0000 | [diff] [blame] | 40 | -e "s#@LLVM_LIBS_DIR@#$(LibDir)#g" \ |
Daniel Dunbar | 1b720a9 | 2009-09-20 19:04:35 +0000 | [diff] [blame] | 41 | -e "s#@CLANG_SOURCE_DIR@#$(PROJ_SRC_DIR)/..#g" \ |
42 | -e "s#@CLANG_BINARY_DIR@#$(PROJ_OBJ_DIR)/..#g" \ | ||||
Daniel Dunbar | 7af18d3 | 2009-09-17 19:55:53 +0000 | [diff] [blame] | 43 | $(PROJ_SRC_DIR)/lit.site.cfg.in > $@ |
Daniel Dunbar | 5803331 | 2009-09-10 23:00:15 +0000 | [diff] [blame] | 44 | |
Gabor Greif | 17feadf | 2008-03-18 07:03:00 +0000 | [diff] [blame] | 45 | clean:: |
Gabor Greif | 5267d7c | 2008-03-20 14:28:22 +0000 | [diff] [blame] | 46 | @ rm -rf Output/ |
Gabor Greif | 17feadf | 2008-03-18 07:03:00 +0000 | [diff] [blame] | 47 | |
Chris Lattner | 9d294b9 | 2008-04-06 22:32:01 +0000 | [diff] [blame] | 48 | .PHONY: all report clean |