[clang-tools-extra] r176373 - Fix recursive make in clang-tools-extra
Edwin Vane
edwin.vane at intel.com
Fri Mar 1 11:50:52 PST 2013
Author: revane
Date: Fri Mar 1 13:50:52 2013
New Revision: 176373
URL: http://llvm.org/viewvc/llvm-project?rev=176373&view=rev
Log:
Fix recursive make in clang-tools-extra
Autoconf make (all) now properly recurses from tools/extra/Makefile into
tools/extra/test/Makefile and tools/extra/test/cpp11-migrate/Makefile. The
'all' target is responsible for creating lit config files and autogenerating
tests. Subsequent 'check-all' targets will properly work.
Re-enabling UseAuto/iterator.cpp test.
General clean-up of clang-tools-extra makefiles; removing dead targets and
removing duplicated pieces of llvm/Makefile.rules.
Modified:
clang-tools-extra/trunk/Makefile
clang-tools-extra/trunk/test/Makefile
clang-tools-extra/trunk/test/cpp11-migrate/Makefile
clang-tools-extra/trunk/test/cpp11-migrate/UseAuto/iterator.cpp
Modified: clang-tools-extra/trunk/Makefile
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/Makefile?rev=176373&r1=176372&r2=176373&view=diff
==============================================================================
--- clang-tools-extra/trunk/Makefile (original)
+++ clang-tools-extra/trunk/Makefile Fri Mar 1 13:50:52 2013
@@ -12,29 +12,15 @@ CLANG_LEVEL := ../..
include $(CLANG_LEVEL)/../../Makefile.config
PARALLEL_DIRS := remove-cstr-calls tool-template clang-format cpp11-migrate
+DIRS := test
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
-
+# Custom target. Pass request to test/Makefile that knows what to do. To access
+# this target you'd issue:
+#
+# make -C <build_dir>/tools/clang/tools/extra test
test::
- @ $(MAKE) -C test
-
-report::
- @ $(MAKE) -C test report
-
-clean::
- @ $(MAKE) -C test clean
+ @ $(MAKE) -C test test
-.PHONY: test report clean
+.PHONY: test
Modified: clang-tools-extra/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/Makefile?rev=176373&r1=176372&r2=176373&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/Makefile (original)
+++ clang-tools-extra/trunk/test/Makefile Fri Mar 1 13:50:52 2013
@@ -9,8 +9,6 @@
CLANG_LEVEL := ../../..
include $(CLANG_LEVEL)/../../Makefile.config
-
-# Recurse into any subdirectories that have their own Makefiles.
DIRS := cpp11-migrate
include $(CLANG_LEVEL)/Makefile
@@ -45,6 +43,11 @@ ifdef VG
endif
all:: lit.site.cfg
+
+# Run just the Clang extra tools tests. This target assumes 'make (all)' has
+# been run previously as that target is responsible for generating lit config
+# files and auto-generated tests.
+test::
@ echo '--- Running the Clang extra tools tests for $(TARGET_TRIPLE) ---'
@ $(PYTHON) $(LLVM_SRC_ROOT)/utils/lit/lit.py \
$(LIT_ARGS) $(TESTARGS) $(TESTDIRS)
@@ -52,7 +55,7 @@ all:: lit.site.cfg
FORCE:
lit.site.cfg: FORCE
- @echo "Making Clang extra tools' 'lit.site.cfg' file..."
+ @echo "Making lit.site.cfg for Clang extra tools..."
@$(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
@@ -69,4 +72,4 @@ lit.site.cfg: FORCE
clean::
@ find . -name Output | xargs rm -fr
-.PHONY: all report clean
+.PHONY: all test clean
Modified: clang-tools-extra/trunk/test/cpp11-migrate/Makefile
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/cpp11-migrate/Makefile?rev=176373&r1=176372&r2=176373&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/cpp11-migrate/Makefile (original)
+++ clang-tools-extra/trunk/test/cpp11-migrate/Makefile Fri Mar 1 13:50:52 2013
@@ -22,7 +22,6 @@ GENERATOR_SCRIPTS := \
UseAuto/gen_basic_std_iterator_tests.cpp.py \
UseAuto/Inputs/gen_my_std.h.py
-
# macro to be used with $(call) that generates a rule and recipe that causes a
# file to be auto-generated from a generator script. Generator scripts must
# follow scheme above. The resulting file is placed in:
Modified: clang-tools-extra/trunk/test/cpp11-migrate/UseAuto/iterator.cpp
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/test/cpp11-migrate/UseAuto/iterator.cpp?rev=176373&r1=176372&r2=176373&view=diff
==============================================================================
--- clang-tools-extra/trunk/test/cpp11-migrate/UseAuto/iterator.cpp (original)
+++ clang-tools-extra/trunk/test/cpp11-migrate/UseAuto/iterator.cpp Fri Mar 1 13:50:52 2013
@@ -1,6 +1,6 @@
// RUN: grep -Ev "// *[A-Z-]+:" %s > %t.cpp
-// NORUN cpp11-migrate -use-auto %t.cpp -- --std=c++11 -I %gen_root/UseAuto/Inputs
-// NORUN FileCheck -input-file=%t.cpp %s
+// RUN: cpp11-migrate -use-auto %t.cpp -- --std=c++11 -I %gen_root/UseAuto/Inputs
+// RUN: FileCheck -input-file=%t.cpp %s
#include "my_std.h"
typedef std::vector<int>::iterator int_iterator;
More information about the cfe-commits
mailing list