[cfe-commits] [clang-tools-extra] r161538 - in /clang-tools-extra/trunk: Makefile remove-cstr-calls/Makefile test/Makefile
Chandler Carruth
chandlerc at gmail.com
Wed Aug 8 16:34:47 PDT 2012
Author: chandlerc
Date: Wed Aug 8 18:34:47 2012
New Revision: 161538
URL: http://llvm.org/viewvc/llvm-project?rev=161538&view=rev
Log:
Fix up the makefiles in the tools repo, and add a top-level makefile
suitable for building as part of the LLVM/Clang build.
Added:
clang-tools-extra/trunk/Makefile
Modified:
clang-tools-extra/trunk/remove-cstr-calls/Makefile
clang-tools-extra/trunk/test/Makefile
Added: clang-tools-extra/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/Makefile?rev=161538&view=auto
==============================================================================
--- clang-tools-extra/trunk/Makefile (added)
+++ clang-tools-extra/trunk/Makefile Wed Aug 8 18:34:47 2012
@@ -0,0 +1,39 @@
+##===- tools/extra/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 := ../..
+DIRS := remove-cstr-calls
+
+include $(CLANG_LEVEL)/../../Makefile.config
+
+include $(CLANG_LEVEL)/Makefile
+
+###
+# Handle the nested test suite.
+
+ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT))
+$(RecursiveTargets)::
+ $(Verb) for dir in test; do \
+ if [ -f $(PROJ_SRC_DIR)/$${dir}/Makefile ] && [ ! -f $${dir}/Makefile ]; then \
+ $(MKDIR) $${dir}; \
+ $(CP) $(PROJ_SRC_DIR)/$${dir}/Makefile $${dir}/Makefile; \
+ fi \
+ done
+endif
+
+test::
+ @ $(MAKE) -C test
+
+report::
+ @ $(MAKE) -C test report
+
+clean::
+ @ $(MAKE) -C test clean
+
+.PHONY: test report clean
Modified: clang-tools-extra/trunk/remove-cstr-calls/Makefile
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/remove-cstr-calls/Makefile?rev=161538&r1=161537&r2=161538&view=diff
==============================================================================
--- clang-tools-extra/trunk/remove-cstr-calls/Makefile (original)
+++ clang-tools-extra/trunk/remove-cstr-calls/Makefile Wed Aug 8 18:34:47 2012
@@ -1,4 +1,4 @@
-##===- tools/remove-cstr-calls/Makefile --------------------*- Makefile -*-===##
+##===- tools/extra/remove-cstr-calls/Makefile --------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
@@ -7,7 +7,7 @@
#
##===----------------------------------------------------------------------===##
-CLANG_LEVEL := ../..
+CLANG_LEVEL := ../../..
TOOLNAME = remove-cstr-calls
NO_INSTALL = 1
@@ -15,9 +15,10 @@
# No plugins, optimize startup time.
TOOL_NO_EXPORTS = 1
-LINK_COMPONENTS := support mc
+include $(CLANG_LEVEL)/../../Makefile.config
+LINK_COMPONENTS := $(TARGETS_TO_BUILD) asmparser support mc
USEDLIBS = clangEdit.a clangTooling.a clangFrontend.a clangSerialization.a clangDriver.a \
- clangRewrite.a clangParse.a clangSema.a clangAnalysis.a \
+ clangRewrite.a clangParse.a clangSema.a clangAnalysis.a \
clangAST.a clangASTMatchers.a clangLex.a clangBasic.a
include $(CLANG_LEVEL)/Makefile
Modified: clang-tools-extra/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/Makefile?rev=161538&r1=161537&r2=161538&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/Makefile (original)
+++ clang-tools-extra/trunk/test/Makefile Wed Aug 8 18:34:47 2012
@@ -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 @@
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
More information about the cfe-commits
mailing list