aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-08-08 23:34:47 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-08-08 23:34:47 +0000
commitda86effe3e6b81f0cc1b463f64bfaa44f163acfe (patch)
tree551208d5571fb4b01966579ffef23a3724e08de0 /test
parent808d54573fb2f8fc7d8b489a626e5d226cacdc6e (diff)
Fix up the makefiles in the tools repo, and add a top-level makefile
suitable for building as part of the LLVM/Clang build. git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@161538 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Makefile38
1 files changed, 15 insertions, 23 deletions
diff --git a/test/Makefile b/test/Makefile
index 4fdafe14..e75b68fe 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,4 +1,13 @@
-CLANG_LEVEL := ..
+##===- tools/extra/test/Makefile ---------------------------*- Makefile -*-===##
+#
+# The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+CLANG_LEVEL := ../../..
include $(CLANG_LEVEL)/Makefile
# Test in all immediate subdirectories if unset.
@@ -29,42 +38,25 @@ ifdef VG
LIT_ARGS += "--vg"
endif
-all:: lit.site.cfg Unit/lit.site.cfg
- @ echo '--- Running clang tests for $(TARGET_TRIPLE) ---'
+all:: lit.site.cfg
+ @ echo '--- Running the Clang extra tools tests for $(TARGET_TRIPLE) ---'
@ $(PYTHON) $(LLVM_SRC_ROOT)/utils/lit/lit.py \
$(LIT_ARGS) $(TESTARGS) $(TESTDIRS)
FORCE:
lit.site.cfg: FORCE
- @echo "Making Clang 'lit.site.cfg' file..."
+ @echo "Making Clang extra tools' 'lit.site.cfg' file..."
@$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp
@$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp
@$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
@$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> lit.tmp
- @$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> lit.tmp
- @$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> lit.tmp
+ @$(ECHOPATH) s=@CLANG_TOOLS_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> lit.tmp
+ @$(ECHOPATH) s=@CLANG_TOOLS_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> lit.tmp
@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> lit.tmp
@sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@
@-rm -f lit.tmp
-Unit/lit.site.cfg: FORCE
- @echo "Making Clang 'Unit/lit.site.cfg' file..."
- @$(MKDIR) $(dir $@)
- @$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > unit.tmp
- @$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> unit.tmp
- @$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> unit.tmp
- @$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> unit.tmp
- @$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> unit.tmp
- @$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> unit.tmp
- @$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> unit.tmp
- @$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> unit.tmp
- @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> unit.tmp
- @$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> unit.tmp
- @$(ECHOPATH) s=@SHLIBPATH_VAR@=$(SHLIBPATH_VAR)=g >> unit.tmp
- @sed -f unit.tmp $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
- @-rm -f unit.tmp
-
clean::
@ find . -name Output | xargs rm -fr