diff options
author | Pavel Labath <pavel@labath.sk> | 2019-09-04 07:46:25 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2019-09-04 07:46:25 +0000 |
commit | 418a272f4ab4221c37a9272d48fd31d5ac1bddc1 (patch) | |
tree | 1bcc614932022201607d7f9e3f148f3c27cc5b14 /lldb/packages/Python/lldbsuite/test/lang/c | |
parent | 5bfe8b562ffb33fc09fa4a4c62f0146087d16ef6 (diff) | |
download | bcm5719-llvm-418a272f4ab4221c37a9272d48fd31d5ac1bddc1.tar.gz bcm5719-llvm-418a272f4ab4221c37a9272d48fd31d5ac1bddc1.zip |
[dotest] Avoid the need for LEVEL= makefile boilerplate
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/c')
30 files changed, 30 insertions, 87 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/anonymous/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/array_types/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/bitfields/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile index 752b7aed397..a90dc493b8c 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/blocks/Makefile @@ -1,6 +1,4 @@ -LEVEL = ../../../make - C_SOURCES := main.c CFLAGS_EXTRAS += -fblocks -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile index 979cefe9b7f..59778ab5d9f 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Makefile @@ -1,9 +1,7 @@ -LEVEL := ../../../make - LD_EXTRAS := -L. -LOne -l$(LIB_PREFIX)One -LTwo -l$(LIB_PREFIX)Two C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules .PHONY: a.out: lib_One lib_Two diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk index 130c7dd511b..18f3725d22f 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk +++ b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/One.mk @@ -1,10 +1,8 @@ -LEVEL := ../../../make - DYLIB_NAME := One DYLIB_C_SOURCES := One.c OneConstant.c DYLIB_ONLY := YES -include $(LEVEL)/Makefile.rules +include Makefile.rules OneConstant.o: OneConstant.c $(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@ diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk index ebe58cc743f..79b256a0e85 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk +++ b/lldb/packages/Python/lldbsuite/test/lang/c/conflicting-symbol/Two.mk @@ -1,10 +1,8 @@ -LEVEL := ../../../make - DYLIB_NAME := Two DYLIB_C_SOURCES := Two.c TwoConstant.c DYLIB_ONLY := YES -include $(LEVEL)/Makefile.rules +include Makefile.rules TwoConstant.o: TwoConstant.c $(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@ diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile index 51adad1d062..47b3ca4be66 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/const_variables/Makefile @@ -1,7 +1,5 @@ -LEVEL = ../../../make - C_SOURCES := main.c functions.c CFLAGS_EXTRAS += -O3 -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/enum_types/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile index cd9ca5c86d8..c9319d6e688 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/find_struct_type/Makefile @@ -1,3 +1,2 @@ -LEVEL = ../../../make C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile index 1db43ab479b..472e733aaad 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/forward/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c foo.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/function_types/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile index b1b77dacc01..7b94b6556f2 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/global_variables/Makefile @@ -1,8 +1,6 @@ -LEVEL = ../../../make - C_SOURCES := main.c DYLIB_NAME := a DYLIB_C_SOURCES := a.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile index fd720188658..ae2e4c45e11 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/local_variables/Makefile @@ -1,7 +1,5 @@ -LEVEL = ../../../make - C_SOURCES := main.c CFLAGS_EXTRAS += -O1 -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/modules/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/Makefile index cd9ca5c86d8..c9319d6e688 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/offsetof/Makefile @@ -1,3 +1,2 @@ -LEVEL = ../../../make C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/recurse/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile index a98622100ff..569979a0653 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/register_variables/Makefile @@ -1,7 +1,5 @@ -LEVEL = ../../../make - C_SOURCES := test.c CFLAGS_EXTRAS += -O1 -D_FORTIFY_SOURCE=0 -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/set_values/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile index 35d712c3f17..5e26f2748c0 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib/Makefile @@ -1,7 +1,5 @@ -LEVEL = ../../../make - DYLIB_NAME := foo DYLIB_C_SOURCES := foo.c C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile index 6d1f1071bf2..f3285de39e0 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/shared_lib_stripped_symbols/Makefile @@ -1,9 +1,7 @@ -LEVEL = ../../../make - DYLIB_NAME := foo DYLIB_C_SOURCES := foo.c C_SOURCES := main.c SPLIT_DEBUG_SYMBOLS = YES -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/step-target/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/stepping/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/strings/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile index cd9ca5c86d8..c9319d6e688 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile @@ -1,3 +1,2 @@ -LEVEL = ../../../make C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile index 0faad10b24a..b26ce5c8b14 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/tls_globals/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c DYLIB_NAME := a @@ -7,4 +5,4 @@ DYLIB_C_SOURCES := a.c ENABLE_THREADS := YES -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/typedef/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile index efabc4d4335..db8ac60dd19 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/unicode/Makefile @@ -1,6 +1,4 @@ -LEVEL = ../../../make - C_SOURCES := main.c CFLAGS_EXTRAS += -finput-charset=UTF-8 -fextended-identifiers -std=c99 -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/unions/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile +++ b/lldb/packages/Python/lldbsuite/test/lang/c/vla/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules |