diff options
author | Frederic Riss <friss@apple.com> | 2019-10-08 16:23:28 +0000 |
---|---|---|
committer | Frederic Riss <friss@apple.com> | 2019-10-08 16:23:28 +0000 |
commit | 3fb4e49a68f5845afc4daea0eb81c69d424ee85f (patch) | |
tree | 895c98d244fd68bc404b24acff7911df9fb37424 /lldb/packages/Python/lldbsuite/test/functionalities/load_unload | |
parent | d1fe34cc93b4d690381a6993a3f7f21fa20e9fe4 (diff) | |
download | bcm5719-llvm-3fb4e49a68f5845afc4daea0eb81c69d424ee85f.tar.gz bcm5719-llvm-3fb4e49a68f5845afc4daea0eb81c69d424ee85f.zip |
[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
llvm-svn: 374076
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/functionalities/load_unload')
5 files changed, 20 insertions, 56 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile index cf6b391cb18..00054aabd4a 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile +++ b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/Makefile @@ -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 +a.out: lib_b lib_a lib_c lib_d hidden_lib_d + include Makefile.rules -a.out: lib_a lib_b lib_c lib_d hidden_lib_d 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_%: - $(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/$*.mk +lib_c: + $(MAKE) -f $(MAKEFILE_RULES) \ + DYLIB_ONLY=YES DYLIB_CXX_SOURCES=c.cpp DYLIB_NAME=loadunload_c -install_name_tool: +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 diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk deleted file mode 100644 index 6ee9dc41a10..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/a.mk +++ /dev/null @@ -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 diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk deleted file mode 100644 index 9d36fcac8ef..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/b.mk +++ /dev/null @@ -1,7 +0,0 @@ -LIB_PREFIX := loadunload_ - -DYLIB_NAME := $(LIB_PREFIX)b -DYLIB_CXX_SOURCES := b.cpp -DYLIB_ONLY := YES - -include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk deleted file mode 100644 index 0869ab61582..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/c.mk +++ /dev/null @@ -1,7 +0,0 @@ -LIB_PREFIX := loadunload_ - -DYLIB_NAME := $(LIB_PREFIX)c -DYLIB_CXX_SOURCES := c.cpp -DYLIB_ONLY := YES - -include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk b/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk deleted file mode 100644 index 111988a314d..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/load_unload/d.mk +++ /dev/null @@ -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 |