diff options
author | Adrian Prantl <aprantl@apple.com> | 2019-09-25 00:36:00 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2019-09-25 00:36:00 +0000 |
commit | 5c4c9e61725526e1e7afca87b395a0efd2aeabfd (patch) | |
tree | 174ed56ba52ef911ec05e5f15d607a5004c34eca /lldb/packages/Python/lldbsuite/test/python_api | |
parent | 24f63176342dabc35582cb9e7574d288c7779272 (diff) | |
download | bcm5719-llvm-5c4c9e61725526e1e7afca87b395a0efd2aeabfd.tar.gz bcm5719-llvm-5c4c9e61725526e1e7afca87b395a0efd2aeabfd.zip |
Canonicalize variable usage in testsuite Makefiles
This test streamlines our use of variables that are expected by
Makefile.rules throughout the test suite. Mostly it replaced
potentially dangerous overrides and updates of variables like CFLAGS
with safe assignments to variables reserved for this purpose like
CFLAGS_EXTRAS.
Differential Revision: https://reviews.llvm.org/D67984
llvm-svn: 372795
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api')
8 files changed, 17 insertions, 13 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile index b5256564c2f..33da5d0645e 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile +++ b/lldb/packages/Python/lldbsuite/test/python_api/findvalue_duplist/Makefile @@ -1,6 +1,8 @@ CXX_SOURCES := main.cpp +include Makefile.rules + # Clean renamed executable on 'make clean' -clean: OBJECTS+=no_synth +clean:: + $(RM) -f no_synth -include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile index b5256564c2f..16a823213db 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile +++ b/lldb/packages/Python/lldbsuite/test/python_api/formatters/Makefile @@ -1,6 +1,7 @@ CXX_SOURCES := main.cpp -# Clean renamed executable on 'make clean' -clean: OBJECTS+=no_synth - include Makefile.rules + +# Clean renamed executable on 'make clean' +clean:: + $(RM) -f no_synth diff --git a/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile index 4cb3dc98c8c..e6d9d8310a0 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile +++ b/lldb/packages/Python/lldbsuite/test/python_api/frame/inlines/Makefile @@ -1,7 +1,7 @@ C_SOURCES := inlines.c ifneq (,$(findstring icc,$(CC))) - CFLAGS += -debug inline-debug-info + CFLAGS_EXTRAS := -debug inline-debug-info endif include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile index 200bdafd69f..4d11bbc8b6a 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile +++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/iter/Makefile @@ -1,4 +1,4 @@ -CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS +CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS ENABLE_THREADS := YES CXX_SOURCES := main.cpp MAKE_DSYM := NO diff --git a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile index 938161724be..6b33049a78b 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile +++ b/lldb/packages/Python/lldbsuite/test/python_api/lldbutil/process/Makefile @@ -1,4 +1,4 @@ -CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS +CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS ENABLE_THREADS := YES CXX_SOURCES := main.cpp MAKE_DSYM :=NO diff --git a/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile index 5eed4cb698c..79209db9696 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile +++ b/lldb/packages/Python/lldbsuite/test/python_api/module_section/Makefile @@ -1,4 +1,4 @@ -CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS +CFLAGS_EXTRAS := -D__STDC_LIMIT_MACROS ENABLE_THREADS := YES CXX_SOURCES := main.cpp b.cpp c.cpp MAKE_DSYM :=NO diff --git a/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile index 03b57891386..8b322ff320b 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile +++ b/lldb/packages/Python/lldbsuite/test/python_api/objc_type/Makefile @@ -1,7 +1,8 @@ OBJC_SOURCES := main.m -CFLAGS_EXTRAS += -w +CFLAGS_EXTRAS := -w + -include Makefile.rules -LDFLAGS += -framework Foundation +LD_EXTRAS := -framework Foundation +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile index 95cdf295fbc..3716c6e29e9 100644 --- a/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile +++ b/lldb/packages/Python/lldbsuite/test/python_api/value_var_update/Makefile @@ -1,5 +1,5 @@ C_SOURCES := main.c -CFLAGS_EXTRAS += -std=c99 +CFLAGS_EXTRAS := -std=c99 # See TestHelloWorld.py, which specifies the executable name with a dictionary. EXE := hello_world |