summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang
diff options
context:
space:
mode:
authorFrederic Riss <friss@apple.com>2019-10-08 16:23:28 +0000
committerFrederic Riss <friss@apple.com>2019-10-08 16:23:28 +0000
commit3fb4e49a68f5845afc4daea0eb81c69d424ee85f (patch)
tree895c98d244fd68bc404b24acff7911df9fb37424 /lldb/packages/Python/lldbsuite/test/lang
parentd1fe34cc93b4d690381a6993a3f7f21fa20e9fe4 (diff)
downloadbcm5719-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/lang')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile20
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile26
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk8
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk8
6 files changed, 23 insertions, 49 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile
index a8ed4b5ecf1..fc9165f67f4 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/Makefile
@@ -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
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
deleted file mode 100644
index b214267c062..00000000000
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/a.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-DYLIB_NAME := a
-DYLIB_CXX_SOURCES := a.cpp
-DYLIB_ONLY := YES
-
-include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk b/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
deleted file mode 100644
index 7fc442d2ae0..00000000000
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/namespace_definitions/b.mk
+++ /dev/null
@@ -1,5 +0,0 @@
-DYLIB_NAME := b
-DYLIB_CXX_SOURCES := b.cpp
-DYLIB_ONLY := YES
-
-include Makefile.rules
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
index e079ba94e38..00a0769a086 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Makefile
@@ -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
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk b/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk
deleted file mode 100644
index 7c36e32ac9d..00000000000
--- a/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/Test/Test.mk
+++ /dev/null
@@ -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
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk b/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk
deleted file mode 100644
index 5455a856e50..00000000000
--- a/lldb/packages/Python/lldbsuite/test/lang/objc/conflicting-definition/TestExt/TestExt.mk
+++ /dev/null
@@ -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
OpenPOWER on IntegriCloud