Author: friss Date: Tue Oct 8 09:23:28 2019 New Revision: 374076 URL: http://llvm.org/viewvc/llvm-project?rev=374076&view=rev Log: [Testsuite] Get rid of most of the recursive shared library Makefiles
Most of the secondary Makefiles we have are just a couple variable definitions and then an include of Makefile.rules. This patch removes most of the secondary Makefiles and replaces them with a direct invocation of Makefile.rules in the main Makefile. The specificities of each sub-build are listed right there on the recursive $(MAKE) call. All the variables that matter are being passed automagically by make as they have been passed on the command line. The only things you need to specify are the variables customizating the Makefile.rules logic for each image. This patch also removes most of the clean logic from those Makefiles and from Makefile.rules. The clean rule is not required anymore now that we run the testsuite in a separate build directory that is wiped with each run. The patch leaves a very crude version of clean in Makefile.rules which removes everything inside of $(BUILDDIR). It does this only when the $(BUILDDIR) looks like a sub-directory of our standard testsuite build directory to be extra safe. Reviewers: aprantl, labath Subscribers: lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D68558 Removed: lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.mk lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/a.mk lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/secondprog.mk lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.mk lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/dylib.mk lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk Modified: lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/Makefile lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile Modified: lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/Makefile Tue Oct 8 09:23:28 2019 @@ -1,11 +1,10 @@ CXX_SOURCES := main.cpp test.cpp -include Makefile.rules +all: dummy -a.out: dummy +include Makefile.rules -dummy: - $(MAKE) VPATH=$(VPATH) -I $(SRCDIR) -f $(SRCDIR)/dummy.mk +dummy: dummy.cpp + $(MAKE) -f $(MAKEFILE_RULES) \ + CXX_SOURCES=dummy.cpp EXE=dummy -clean:: - $(MAKE) VPATH=$(VPATH) -I $(SRCDIR) -f $(SRCDIR)/dummy.mk clean Removed: lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/commands/expression/top-level/dummy.mk (removed) @@ -1,4 +0,0 @@ -CXX_SOURCES := dummy.cpp -EXE := dummy - -include Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/Makefile Tue Oct 8 09:23:28 2019 @@ -1,14 +1,10 @@ -LIB_PREFIX := load_ - -LD_EXTRAS := -L. -l$(LIB_PREFIX)a +LD_EXTRAS := -L. -lload_a CXX_SOURCES := main.cpp -include Makefile.rules - -a.out: lib_a +a.out: libload_a -lib_%: - $(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/$*.mk +include Makefile.rules -clean:: - $(MAKE) -f $(SRCDIR)/a.mk clean +libload_a: + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_NAME=load_a DYLIB_CXX_SOURCES=a.cpp Removed: lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/a.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/a.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/a.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/commands/target/create-deps/a.mk (removed) @@ -1,7 +0,0 @@ -LIB_PREFIX := load_ - -DYLIB_NAME := $(LIB_PREFIX)a -DYLIB_CXX_SOURCES := a.cpp -DYLIB_ONLY := YES - -include Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/Makefile Tue Oct 8 09:23:28 2019 @@ -1,11 +1,9 @@ CXX_SOURCES := main.cpp -all: a.out secondprog +all: secondprog include Makefile.rules -secondprog: - $(MAKE) VPATH=$(VPATH) -f $(SRCDIR)/secondprog.mk - -clean:: - $(MAKE) -f $(SRCDIR)/secondprog.mk clean +secondprog: secondprog.cpp + $(MAKE) -f $(MAKEFILE_RULES) \ + CXX_SOURCES=secondprog.cpp EXE=secondprog Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/secondprog.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/secondprog.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/secondprog.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/exec/secondprog.mk (removed) @@ -1,4 +0,0 @@ -CXX_SOURCES := secondprog.cpp -EXE = secondprog - -include Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/Makefile Tue Oct 8 09:23:28 2019 @@ -5,7 +5,5 @@ all: a.out simple include Makefile.rules simple: - $(MAKE) VPATH=$(VPATH) -f $(SRCDIR)/simple.mk - -clean:: - $(MAKE) -f $(SRCDIR)/simple.mk clean \ No newline at end of file + $(MAKE) -f $(MAKEFILE_RULES) \ + C_SOURCES=simple.c EXE=simple Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/jitloader_gdb/simple.mk (removed) @@ -1,4 +0,0 @@ -C_SOURCES := simple.c -EXE = simple - -include Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile Tue Oct 8 09:23:28 2019 @@ -1,28 +1,32 @@ -LIB_PREFIX := loadunload_ - -LD_EXTRAS := -L. -l$(LIB_PREFIX)d +LD_EXTRAS := -L. -lloadunload_d CXX_SOURCES := main.cpp USE_LIBDL := 1 -include Makefile.rules - -a.out: lib_a lib_b lib_c lib_d hidden_lib_d install_name_tool +a.out: lib_b lib_a lib_c lib_d hidden_lib_d -lib_%: - $(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/$*.mk +include Makefile.rules -install_name_tool: +lib_a: lib_b + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=a.cpp DYLIB_NAME=loadunload_a \ + LD_EXTRAS="-L. -lloadunload_b" + +lib_b: + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=b.cpp DYLIB_NAME=loadunload_b + +lib_c: + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=loadunload_c + +lib_d: + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d ifeq ($(OS),Darwin) install_name_tool -id @executable_path/libloadunload_d.dylib libloadunload_d.dylib endif - hidden_lib_d: - $(MAKE) VPATH=$(SRCDIR)/hidden -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile - -clean:: - $(MAKE) -f $(SRCDIR)/a.mk clean - $(MAKE) -f $(SRCDIR)/b.mk clean - $(MAKE) -f $(SRCDIR)/c.mk clean - $(MAKE) -f $(SRCDIR)/d.mk clean - $(MAKE) -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile clean + mkdir -p hidden + $(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload_d Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk (removed) @@ -1,17 +0,0 @@ -LIB_PREFIX := loadunload_ - -LD_EXTRAS := -L. -l$(LIB_PREFIX)b - -DYLIB_NAME := $(LIB_PREFIX)a -DYLIB_CXX_SOURCES := a.cpp -DYLIB_ONLY := YES - -include Makefile.rules - -$(DYLIB_FILENAME): lib_b - -.PHONY lib_b: - $(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/b.mk - -clean:: - $(MAKE) -I $(SRCDIR) -f $(SRCDIR)/b.mk clean Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk (removed) @@ -1,7 +0,0 @@ -LIB_PREFIX := loadunload_ - -DYLIB_NAME := $(LIB_PREFIX)b -DYLIB_CXX_SOURCES := b.cpp -DYLIB_ONLY := YES - -include Makefile.rules Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk (removed) @@ -1,7 +0,0 @@ -LIB_PREFIX := loadunload_ - -DYLIB_NAME := $(LIB_PREFIX)c -DYLIB_CXX_SOURCES := c.cpp -DYLIB_ONLY := YES - -include Makefile.rules Removed: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk (removed) @@ -1,9 +0,0 @@ -LIB_PREFIX := loadunload_ - -DYLIB_EXECUTABLE_PATH := $(CURDIR) - -DYLIB_NAME := $(LIB_PREFIX)d -DYLIB_CXX_SOURCES := d.cpp -DYLIB_ONLY := YES - -include Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/functionalities/load_using_paths/Makefile Tue Oct 8 09:23:28 2019 @@ -1,12 +1,11 @@ CXX_SOURCES := main.cpp USE_LIBDL := 1 -include Makefile.rules - all: hidden_lib a.out +include Makefile.rules + hidden_lib: - $(MAKE) VPATH=$(SRCDIR)/hidden -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile + $(MAKE) VPATH=$(SRCDIR)/hidden -C hidden -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=d.cpp DYLIB_NAME=loadunload -clean:: - $(MAKE) -I $(SRCDIR)/hidden -C hidden -f $(SRCDIR)/hidden/Makefile clean Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile Tue Oct 8 09:23:28 2019 @@ -1,17 +1,15 @@ -LD_EXTRAS := -L. -l$(LIB_PREFIX)a -l$(LIB_PREFIX)b +LD_EXTRAS := -L. -la -lb CXX_SOURCES := main.cpp -include Makefile.rules +a.out: liba libb -.PHONY: -a.out: lib_a lib_b +include Makefile.rules -lib_%: - $(MAKE) VPATH=$(VPATH) -f $(SRCDIR)/$*.mk +liba: + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_NAME=a DYLIB_CXX_SOURCES=a.cpp -hidden_lib_d: - $(MAKE) -C hidden +libb: + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_NAME=b DYLIB_CXX_SOURCES=b.cpp -clean:: - $(MAKE) -f $(SRCDIR)/a.mk clean - $(MAKE) -f $(SRCDIR)/b.mk clean Removed: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk (removed) @@ -1,5 +0,0 @@ -DYLIB_NAME := a -DYLIB_CXX_SOURCES := a.cpp -DYLIB_ONLY := YES - -include Makefile.rules Removed: lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk (removed) @@ -1,5 +0,0 @@ -DYLIB_NAME := b -DYLIB_CXX_SOURCES := b.cpp -DYLIB_ONLY := YES - -include Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile Tue Oct 8 09:23:28 2019 @@ -1,21 +1,23 @@ -LD_EXTRAS = -lobjc -framework Foundation - -include Makefile.rules +LD_EXTRAS := -lobjc -framework Foundation -L. -lTest -lTestExt +OBJC_SOURCES := main.m all: a.out +a.out: libTest.dylib libTestExt.dylib + +include Makefile.rules + libTest.dylib: Test/Test.m mkdir -p Test - $(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/Test/Test.mk all + $(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_NAME=Test DYLIB_OBJC_SOURCES=Test/Test.m \ + LD_EXTRAS="-lobjc -framework Foundation" \ + CFLAGS_EXTRAS=-I$(SRCDIR) libTestExt.dylib: TestExt/TestExt.m mkdir -p TestExt - $(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/TestExt/TestExt.mk all - -a.out: main.m libTest.dylib libTestExt.dylib - $(CC) $(LDFLAGS) -I$(SRCDIR) -L. -lTest -lTestExt -o a.out $< + $(MAKE) MAKE_DSYM=YES -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_NAME=TestExt DYLIB_OBJC_SOURCES=TestExt/TestExt.m \ + LD_EXTRAS="-lobjc -framework Foundation -lTest -L." \ + CFLAGS_EXTRAS=-I$(SRCDIR) -clean:: - rm -rf libTest.dylib libTestExt.dylib a.out Test.o TestExt.o libTest.dylib.dSYM libTestExt.dylib.dSYM - $(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/Test/Test.mk clean - $(MAKE) MAKE_DSYM=YES VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/TestExt/TestExt.mk clean Removed: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk (removed) @@ -1,8 +0,0 @@ -DYLIB_NAME := Test -DYLIB_ONLY := YES -CFLAGS_EXTRAS = -I$(SRCDIR)/.. -LD_EXTRAS = -lobjc -framework Foundation - -DYLIB_OBJC_SOURCES = Test/Test.m - -include Makefile.rules Removed: lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk (removed) @@ -1,8 +0,0 @@ -DYLIB_NAME := TestExt -DYLIB_ONLY := YES -CFLAGS_EXTRAS = -I$(SRCDIR)/.. -LD_EXTRAS = -L. -lTest -lobjc -framework Foundation - -DYLIB_OBJC_SOURCES = TestExt/TestExt.m - -include Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile Tue Oct 8 09:23:28 2019 @@ -5,9 +5,7 @@ C_SOURCES := main.c all: a.out create-empty-corefile create-empty-corefile: - $(MAKE) VPATH=$(VPATH) -f $(SRCDIR)/create-empty-corefile.mk - -clean:: - $(MAKE) -f create-empty-corefile.mk clean + $(MAKE) -f $(MAKEFILE_RULES) EXE=create-empty-corefile \ + C_SOURCES=create-empty-corefile.c include Makefile.rules Removed: lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk (removed) @@ -1,6 +0,0 @@ -MAKE_DSYM := NO - -CXX_SOURCES := create-empty-corefile.cpp -EXE = create-empty-corefile - -include Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/Makefile Tue Oct 8 09:23:28 2019 @@ -8,11 +8,8 @@ CFLAGS_EXTRAS := -target $(TRIPLE) all: libfoo.dylib a.out -lib%.dylib: %.c - $(MAKE) MAKE_DSYM=YES CC=$(CC) \ - ARCH=$(ARCH) DSYMUTIL=$(DSYMUTIL) \ - BASENAME=$(shell basename $< .c) \ - TRIPLE=x86_64-apple-macosx10.15 SDKROOT=$(SDKROOT) \ - VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/dylib.mk all +libfoo.dylib: foo.c \ + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_NAME=foo DYLIB_C_SOURCES=foo.c include $(LEVEL)/Makefile.rules Removed: lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/dylib.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/dylib.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/dylib.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/macosx/macabi/dylib.mk (removed) @@ -1,6 +0,0 @@ -LEVEL = ../../make -DYLIB_ONLY := YES -DYLIB_NAME := $(BASENAME) -DYLIB_C_SOURCES := $(DYLIB_NAME).c - -include $(LEVEL)/Makefile.rules Modified: lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules (original) +++ lldb/trunk/packages/Python/lldbsuite/test/make/Makefile.rules Tue Oct 8 09:23:28 2019 @@ -36,7 +36,8 @@ SRCDIR := $(shell dirname $(firstword $(MAKEFILE_LIST))) BUILDDIR := $(shell pwd) -THIS_FILE_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST))) +MAKEFILE_RULES := $(lastword $(MAKEFILE_LIST)) +THIS_FILE_DIR := $(shell dirname $(MAKEFILE_RULES)) LLDB_BASE_DIR := $(THIS_FILE_DIR)/../../../../../ #---------------------------------------------------------------------- @@ -764,29 +765,10 @@ endif dsym: $(DSYM) all: $(EXE) $(DSYM) clean:: - $(RM) -rf $(OBJECTS) $(PREREQS) $(PREREQS:.d=.d.tmp) $(DWOS) $(ARCHIVE_NAME) $(ARCHIVE_OBJECTS) $(CLANG_MODULE_CACHE_DIR) -ifneq "$(DYLIB_NAME)" "" - $(RM) -r $(DYLIB_FILENAME).dSYM - $(RM) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_PREREQS:.d=.d.tmp) $(DYLIB_DWOS) $(DYLIB_FILENAME) $(DYLIB_FILENAME).debug -endif -ifneq "$(FRAMEWORK)" "" - $(RM) -rf $(FRAMEWORK).framework -endif -ifneq "$(PCH_OUTPUT)" "" - $(RM) $(PCH_OUTPUT) -endif -ifneq "$(DSYM)" "" - $(RM) -r "$(DSYM)" -endif -ifeq "$(OS)" "Windows_NT" -# http://llvm.org/pr24589 - IF EXIST "$(EXE)" del "$(EXE)" - $(RM) $(wildcard *.manifest *.pdb *.ilk) -ifneq "$(DYLIB_NAME)" "" - $(RM) $(DYLIB_NAME).lib $(DYLIB_NAME).exp -endif +ifeq "$(findstring lldb-test-build.noindex, $(BUILDDIR))" "" + $(error Trying to invoke the clean rule, but not using the default build tree layout) else - $(RM) "$(EXE)" + $(RM) -r $(wildcard $(BUILDDIR)/*) endif #---------------------------------------------------------------------- Modified: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile?rev=374076&r1=374075&r2=374076&view=diff ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile (original) +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile Tue Oct 8 09:23:28 2019 @@ -1,15 +1,19 @@ LIB_PREFIX := svr4lib -LD_EXTRAS := -L. -l$(LIB_PREFIX)_a -l$(LIB_PREFIX)_b\" +LD_EXTRAS := -L. -lsvr4lib_a -lsvr4lib_b\" CXX_SOURCES := main.cpp USE_LIBDL := 1 MAKE_DSYM := NO -include Makefile.rules +a.out: svr4lib_a svr4lib_b_quote -a.out: $(LIB_PREFIX)_a $(LIB_PREFIX)_b_quote +include Makefile.rules -svr4lib_%: - $(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f "$(SRCDIR)/$(LIB_PREFIX)_$*.mk" +svr4lib_a: + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_NAME=svr4lib_a DYLIB_CXX_SOURCES=svr4lib_a.cpp \ + DYLIB_ONLY=YES -clean:: - $(MAKE) -f $(SRCDIR)/$(LIB_PREFIX)_a.mk clean +svr4lib_b_quote: + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_NAME=svr4lib_b\\\" DYLIB_CXX_SOURCES=svr4lib_b_quote.cpp \ + DYLIB_ONLY=YES Removed: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk (removed) @@ -1,7 +0,0 @@ -LIB_PREFIX := svr4lib - -DYLIB_NAME := $(LIB_PREFIX)_a -DYLIB_CXX_SOURCES := $(LIB_PREFIX)_a.cpp -DYLIB_ONLY := YES - -include Makefile.rules Removed: lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk?rev=374075&view=auto ============================================================================== --- lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk (original) +++ lldb/trunk/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk (removed) @@ -1,7 +0,0 @@ -LIB_PREFIX := svr4lib - -DYLIB_NAME := $(LIB_PREFIX)_b\" -DYLIB_CXX_SOURCES := $(LIB_PREFIX)_b_quote.cpp -DYLIB_ONLY := YES - -include Makefile.rules _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits