forked from OSchip/llvm-project
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. llvm-svn: 176373
This commit is contained in:
parent
169949724e
commit
b1bb4c2dbb
|
@ -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
|
||||
@ $(MAKE) -C test test
|
||||
|
||||
report::
|
||||
@ $(MAKE) -C test report
|
||||
|
||||
clean::
|
||||
@ $(MAKE) -C test clean
|
||||
|
||||
.PHONY: test report clean
|
||||
.PHONY: test
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue