Summary:
Instead of each test case knowing its depth relative to the test root,
we can just have dotest add the folder containing Makefile.rules to the
include path.
This was motivated by r370616, though I have been wanting to do this
ever since we moved to building tests out-of-tree.
The only manually modified files in this patch are lldbinline.py and
plugins/builder_base.py. The rest of the patch has been produced by this
shell command:
find . \( -name Makefile -o -name '*.mk' \) -exec sed --in-place -e '/LEVEL *:\?=/d' -e '1,2{/^$/d}' -e 's,\$(LEVEL)/,,' {} +
Reviewers: teemperor, aprantl, espindola, jfb
Subscribers: emaste, javed.absar, arichardson, christof, arphaman, lldb-commits
Differential Revision: https://reviews.llvm.org/D67083
llvm-svn: 370845
29 lines
704 B
Makefile
29 lines
704 B
Makefile
LIB_PREFIX := loadunload_
|
|
|
|
LD_EXTRAS := -L. -l$(LIB_PREFIX)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
|
|
|
|
lib_%:
|
|
$(MAKE) VPATH=$(SRCDIR) -I $(SRCDIR) -f $(SRCDIR)/$*.mk
|
|
|
|
install_name_tool:
|
|
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
|