Fix clean target warnings
cover Fix clean target warnings
This patch series consists of changes to lib.mk to allow overriding common clean target from Makefiles. This fixes warnings when clean overriding and ignoring warnings. Also fixes splice clean target removing a script that runs the test from its clean target.
Shuah Khan (8):
selftests: splice: fix clean target to not remove
default_file_splice_read.sh
selftests: lib.mk: define CLEAN macro to allow Makefiles to override
clean
selftests: futex: override clean in lib.mk to fix warnings
selftests: gpio: override clean in lib.mk to fix warnings
selftests: powerpc: override clean in lib.mk to fix warnings
selftests: splice: override clean in lib.mk to fix warnings
selftests: sync: override clean in lib.mk to fix warnings
selftests: x86: override clean in lib.mk to fix warnings
tools/testing/selftests/futex/Makefile | 3 ++- tools/testing/selftests/gpio/Makefile | 3 ++- tools/testing/selftests/lib.mk | 6 +++++- tools/testing/selftests/powerpc/Makefile | 3 ++- tools/testing/selftests/splice/Makefile | 5 +++-- tools/testing/selftests/sync/Makefile | 3 ++- tools/testing/selftests/x86/Makefile | 3 ++- 7 files changed, 18 insertions(+), 8 deletions(-)
Signature · 1 line
2.9.3
PATCH 1/8 selftests: splice: fix clean target to not remove default_file_splice_read.sh
splice clean target removes the shell script default_file_splice_read.sh that runs the splice test. Fix it to not remove this file.
--- tools/testing/selftests/splice/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/splice/Makefile +1 -1
@@ -5,4 +5,4 @@ all: $(TEST_PROGS) $(EXTRA) include ../lib.mk clean: - rm -fr $(TEST_PROGS) $(EXTRA) + rm -fr $(EXTRA)
Signature · 1 line
2.9.3
PATCH 2/8 selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
In reply to Shuah KhanDefine CLEAN macro to allow Makefiles to override common clean target in lib.mk. This will help fix the following failures:
warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean'
--- tools/testing/selftests/lib.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
tools/testing/selftests/lib.mk +5 -1
@@ -51,8 +51,12 @@ endef emit_tests: $(EMIT_TESTS) -clean: +define CLEAN $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN) +endef + +clean: + $(CLEAN) $(OUTPUT)/%:%.c $(LINK.c) $^ $(LDLIBS) -o $@
Signature · 1 line
2.9.3
Re: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
Quoted 7 lines · Shuah Khan
Define CLEAN macro to allow Makefiles to override common clean target in lib.mk. This will help fix the following failures:
warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>
Should probably have:
In hindsight I'm not sure moving the clean target into lib.mk was the best idea, but anyway it's a bit late to change our mind on that.
This patch is a good solution to fix the warnings.
cheers
Re: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
Quoted 5 lines · Michael Ellerman
Quoted 3 lines · Shuah Khan
Define CLEAN macro to allow Makefiles to override common clean target in lib.mk. This will help fix the following failures:
Quoted 8 lines
Quoted 4 lines
warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>Should probably have:
Fixes 88baa78d1f31 ("selftests: remove duplicated all and clean target")
Amended the change log to add the above.
Quoted 4 lines
In hindsight I'm not sure moving the clean target into lib.mk was the best idea, but anyway it's a bit late to change our mind on that.
Yeah. Moving clean target to lib.mk ended up to be problematic. However, there are some advantages as well. It will simplify some Makefiles. One thing that was missed was that not finding the Makefiles that require overrides. Anyway live and learn.
Quoted 5 lines
This patch is a good solution to fix the warnings.
Acked-by Michael Ellerman <[email protected]>
Thanks. I plan to apply the patch with the amended changelog and your Ack. Please let me know if you want to see v2 with the change sent out.
thanks,
-- Shuah
Michael Ellerman
reviewerRe: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
Quoted 9 lines · Shuah Khan
Quoted 5 lines · Michael Ellerman
Shuah Khan <[email protected]> writes:
This patch is a good solution to fix the warnings.
Acked-by Michael Ellerman <[email protected]>Thanks. I plan to apply the patch with the amended changelog and your Ack. Please let me know if you want to see v2 with the change sent out.
I don't really mind if you send it or not.
cheers
RE: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
In reply to Shuah KhanFrom: Shuah Khan
Quoted 17 lines
Sent: 22 April 2017 00:15
Define CLEAN macro to allow Makefiles to override common clean target in lib.mk. This will help fix the following failures:warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/lib.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)tools/testing/selftests/lib.mk +0
-0
tools/testing/selftests/lib.mk endef · line 59
Quoted 10 lines
tools/testing/selftests/lib.mk +5
-1@@ -51,8 +51,12 @@ endef emit_tests: $(EMIT_TESTS) -clean: +define CLEAN $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN) +endef + +clean: + $(CLEAN)
If might be easier to do something like:
ifneq($(NO_CLEAN),y)
clean:
$(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)
endif
David
Shuah Khan
maintainerRe: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
Quoted 31 lines · David Laight
From: Shuah Khan
Quoted 17 lines
Sent: 22 April 2017 00:15
Define CLEAN macro to allow Makefiles to override common clean target in lib.mk. This will help fix the following failures:warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/lib.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)tools/testing/selftests/lib.mk +0
-0tools/testing/selftests/lib.mk endef · line 59
Quoted 10 lines
tools/testing/selftests/lib.mk +5
-1@@ -51,8 +51,12 @@ endef emit_tests: $(EMIT_TESTS) -clean: +define CLEAN $(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN) +endef + +clean: + $(CLEAN)If might be easier to do something like:
Quoted 7 lines
ifneq($(NO_CLEAN),y)
clean:$(RM) -r $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES) $(EXTRA_CLEAN)endif
David
I am not sure that it is easier. Defining a macro would work well in this case to override and also works well with what we are doing for other overrides we already have such as EMIT_TESTS.
thanks,
-- Shuah
PATCH 3/8 selftests: futex: override clean in lib.mk to fix warnings
In reply to Shuah KhanAdd override for lib.mk clean to fix the following warnings from clean target run.
Makefile:36: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean'
--- tools/testing/selftests/futex/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/futex/Makefile +2 -1
@@ -32,9 +32,10 @@ override define EMIT_TESTS echo "./run.sh" endef -clean: +override define CLEAN for DIR in $(SUBDIRS); do \ BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ done +endef
Signature · 1 line
2.9.3
Re: [PATCH 3/8] selftests: futex: override clean in lib.mk to fix warnings
Quoted 17 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:36: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/futex/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/futex/Makefile +0
-0@@ -32,9 +32,10 @@ override define EMIT_TESTS echo "./run.sh"
tools/testing/selftests/futex/Makefile override define EMIT_TESTS · line 41
Quoted 10 lines
tools/testing/selftests/futex/Makefile +2
-1endef -clean: +override define CLEAN for DIR in $(SUBDIRS); do \ BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ done +endef
Taking the move of clean into lib.mk as a given,
Signature · 2 lines
Darren Hart VMware Open Source Technology Center
Re: [PATCH 3/8] selftests: futex: override clean in lib.mk to fix warnings
Quoted 20 lines · Darren Hart
Quoted 19 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:36: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/futex/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/futex/Makefile +0
-0@@ -32,9 +32,10 @@ override define EMIT_TESTS echo "./run.sh" endef
Quoted 10 lines
tools/testing/selftests/futex/Makefile override define EMIT_TESTS · line 41
Quoted 8 lines
tools/testing/selftests/futex/Makefile +2
-1-clean: +override define CLEAN for DIR in $(SUBDIRS); do \ BUILD_TARGET=$(OUTPUT)/$$DIR; \ mkdir $$BUILD_TARGET -p; \ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ done +endefTaking the move of clean into lib.mk as a given,
Yeah I considered undoing that, and chose to fix the missed issues instead.
Quoted 3 lines
thanks,
-- Shuah
PATCH 4/8 selftests: gpio: override clean in lib.mk to fix warnings
In reply to Shuah KhanAdd override for lib.mk clean to fix the following warnings from clean target run.
Makefile:11: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean'
--- tools/testing/selftests/gpio/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/gpio/Makefile +2 -1
@@ -7,8 +7,9 @@ include ../lib.mk all: $(BINARIES) -clean: +override define CLEAN $(RM) $(BINARIES) +endef CFLAGS += -O2 -g -std=gnu99 -Wall -I../../../../usr/include/ LDLIBS += -lmount -I/usr/include/libmount
Signature · 1 line
2.9.3
Michael Ellerman
reviewerRe: [PATCH 4/8] selftests: gpio: override clean in lib.mk to fix warnings
Quoted 16 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:11: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/gpio/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/gpio/Makefile +0
-0
tools/testing/selftests/gpio/Makefile include ../lib.mk · line 12
Quoted 7 lines
tools/testing/selftests/gpio/Makefile +2
-1@@ -7,8 +7,9 @@ include ../lib.mk all: $(BINARIES) -clean: +override define CLEAN $(RM) $(BINARIES) +endef
This could be achieved more simply with:
EXTRA_CLEAN := $(BINARIES)
cheers
Re: [PATCH 4/8] selftests: gpio: override clean in lib.mk to fix warnings
Quoted 21 lines · Michael Ellerman
Quoted 19 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:11: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/gpio/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/gpio/Makefile +0
-0@@ -7,8 +7,9 @@ include ../lib.mk all: $(BINARIES)
Quoted 9 lines
tools/testing/selftests/gpio/Makefile include ../lib.mk · line 12
Quoted 4 lines
tools/testing/selftests/gpio/Makefile +2
-1-clean: +override define CLEAN $(RM) $(BINARIES) +endefThis could be achieved more simply with:
EXTRA_CLEAN:= $(BINARIES)
gpio clean requires special handling. I have one more patch I sent out that handles that. So I am going to leave this patch the way with override.
thanks,
-- Shuah
PATCH 5/8 selftests: powerpc: override clean in lib.mk to fix warnings
In reply to Shuah KhanAdd override for lib.mk clean to fix the following warnings from clean target run.
Makefile:63: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean'
--- tools/testing/selftests/powerpc/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/powerpc/Makefile +2 -1
@@ -59,12 +59,13 @@ override define EMIT_TESTS done; endef -clean: +override define CLEAN @for TARGET in $(SUB_DIRS); do \ BUILD_TARGET=$$OUTPUT/$$TARGET; \ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$TARGET clean; \ done; rm -f tags +endef tags: find . -name '*.c' -o -name '*.h' | xargs ctags
Signature · 1 line
2.9.3
PATCH 6/8 selftests: splice: override clean in lib.mk to fix warnings
In reply to Shuah KhanAdd override for lib.mk clean to fix the following warnings from clean target run.
Makefile:8: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean'
--- tools/testing/selftests/splice/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/splice/Makefile +2 -1
@@ -4,5 +4,6 @@ all: $(TEST_PROGS) $(EXTRA) include ../lib.mk -clean: +override define CLEAN rm -fr $(EXTRA) +endef
Signature · 1 line
2.9.3
Michael Ellerman
reviewerRe: [PATCH 6/8] selftests: splice: override clean in lib.mk to fix warnings
Quoted 16 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:8: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/splice/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/splice/Makefile +0
-0
tools/testing/selftests/splice/Makefile all: $(TEST_PROGS) $(EXTRA) · line 9
Quoted 7 lines
tools/testing/selftests/splice/Makefile +2
-1@@ -4,5 +4,6 @@ all: $(TEST_PROGS) $(EXTRA) include ../lib.mk -clean: +override define CLEAN rm -fr $(EXTRA) +endef
Could just be:
EXTRA_CLEAN := $(EXTRA)
cheers
Re: [PATCH 6/8] selftests: splice: override clean in lib.mk to fix warnings
Quoted 21 lines · Michael Ellerman
Quoted 19 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:8: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/splice/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/splice/Makefile +0
-0@@ -4,5 +4,6 @@ all: $(TEST_PROGS) $(EXTRA) include ../lib.mk
Quoted 9 lines
tools/testing/selftests/splice/Makefile all: $(TEST_PROGS) $(EXTRA) · line 9
Quoted 4 lines
tools/testing/selftests/splice/Makefile +2
-1-clean: +override define CLEAN rm -fr $(EXTRA) +endefCould just be:
EXTRA_CLEAN:= $(EXTRA)
Will send v2 with this change.
-- Shuah
PATCH 7/8 selftests: sync: override clean in lib.mk to fix warnings
In reply to Shuah KhanAdd override for lib.mk clean to fix the following warnings from clean target run.
Makefile:24: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean'
--- tools/testing/selftests/sync/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/sync/Makefile +2 -1
@@ -20,5 +20,6 @@ TESTS += sync_stress_merge.o sync_test: $(OBJS) $(TESTS) -clean: +override define CLEAN $(RM) sync_test $(OBJS) $(TESTS) +endef
Signature · 1 line
2.9.3
Michael Ellerman
reviewerRe: [PATCH 7/8] selftests: sync: override clean in lib.mk to fix warnings
Quoted 16 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:24: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/sync/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/sync/Makefile +0
-0
tools/testing/selftests/sync/Makefile TESTS += sync_stress_merge.o · line 25
Quoted 7 lines
tools/testing/selftests/sync/Makefile +2
-1@@ -20,5 +20,6 @@ TESTS += sync_stress_merge.o sync_test: $(OBJS) $(TESTS) -clean: +override define CLEAN $(RM) sync_test $(OBJS) $(TESTS) +endef
EXTRA_CLEAN := sync_test $(OBJS) $(TESTS)
cheers
Re: [PATCH 7/8] selftests: sync: override clean in lib.mk to fix warnings
Quoted 19 lines · Michael Ellerman
Quoted 17 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:24: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/sync/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/sync/Makefile +0
-0@@ -20,5 +20,6 @@ TESTS += sync_stress_merge.o
Quoted 9 lines
tools/testing/selftests/sync/Makefile TESTS += sync_stress_merge.o · line 25
Quoted 6 lines
tools/testing/selftests/sync/Makefile +2
-1sync_test: $(OBJS) $(TESTS) -clean: +override define CLEAN $(RM) sync_test $(OBJS) $(TESTS) +endef
EXTRA_CLEAN:=sync_test$(OBJS) $(TESTS)
Will send v2 with this change.
-- Shuah
PATCH 8/8 selftests: x86: override clean in lib.mk to fix warnings
In reply to Shuah KhanAdd override for lib.mk clean to fix the following warnings from clean target run.
Makefile:44: warning: overriding recipe for target 'clean' ../lib.mk:55: warning: ignoring old recipe for target 'clean'
--- tools/testing/selftests/x86/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/testing/selftests/x86/Makefile +2 -1
@@ -40,8 +40,9 @@ all_32: $(BINARIES_32) all_64: $(BINARIES_64) -clean: +override define CLEAN $(RM) $(BINARIES_32) $(BINARIES_64) +endef $(BINARIES_32): $(OUTPUT)/%_32: %.c $(CC) -m32 -o $@ $(CFLAGS) $(EXTRA_CFLAGS) $^ -lrt -ldl -lm
Signature · 1 line
2.9.3
Michael Ellerman
reviewerRe: [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings
Quoted 16 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:44: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/x86/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/x86/Makefile +0
-0
tools/testing/selftests/x86/Makefile all_32: $(BINARIES_32) · line 45
Quoted 7 lines
tools/testing/selftests/x86/Makefile +2
-1@@ -40,8 +40,9 @@ all_32: $(BINARIES_32) all_64: $(BINARIES_64) -clean: +override define CLEAN $(RM) $(BINARIES_32) $(BINARIES_64) +endef
Simpler as:
EXTRA_CLEAN := $(BINARIES_32) $(BINARIES_64)
cheers
RE: [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings
From: Linuxppc-dev Michael Ellerman
Quoted 21 lines
Quoted 19 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:44: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/x86/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/x86/Makefile +0
-0@@ -40,8 +40,9 @@ all_32: $(BINARIES_32) all_64: $(BINARIES_64)
Quoted 8 lines
tools/testing/selftests/x86/Makefile all_32: $(BINARIES_32) · line 45
Quoted 4 lines
tools/testing/selftests/x86/Makefile +2
-1-clean: +override define CLEAN $(RM) $(BINARIES_32) $(BINARIES_64) +endefSimpler as:
EXTRA_CLEAN:= $(BINARIES_32) $(BINARIES_64)
Actually for builds that insist on crapping all over the source tree I've used:
clean:
rm -rf cat .cvsignore 2>/dev/null
David
Shuah Khan
maintainerRe: [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings
Quoted 29 lines · David Laight
From: Linuxppc-dev Michael Ellerman
Quoted 28 lines
Quoted 16 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:44: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/x86/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/x86/Makefile +0
-0tools/testing/selftests/x86/Makefile all_32: $(BINARIES_32) · line 45
Quoted 7 lines
tools/testing/selftests/x86/Makefile +2
-1@@ -40,8 +40,9 @@ all_32: $(BINARIES_32) all_64: $(BINARIES_64) -clean: +override define CLEAN $(RM) $(BINARIES_32) $(BINARIES_64) +endefSimpler as:
Quoted 8 lines
Quoted 1 line
EXTRA_CLEAN:= $(BINARIES_32) $(BINARIES_64)Actually for builds that insist on crapping all over the source tree I've used:
clean:
rm -rfcat .cvsignore 2>/dev/nullDavid
This will have to be done as a separate change. The warnings I am fixing are related to common clean target in lib.mk and the need to override.
thanks,
-- Shuah
Re: [PATCH 8/8] selftests: x86: override clean in lib.mk to fix warnings
In reply to Michael EllermanQuoted 21 lines · Michael Ellerman
Quoted 19 lines · Shuah Khan
Add override for lib.mk clean to fix the following warnings from clean target run.
Makefile:44: warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'Signed-off-by Shuah Khan <[email protected]>--- tools/testing/selftests/x86/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)tools/testing/selftests/x86/Makefile +0
-0@@ -40,8 +40,9 @@ all_32: $(BINARIES_32) all_64: $(BINARIES_64)
Quoted 9 lines
tools/testing/selftests/x86/Makefile all_32: $(BINARIES_32) · line 45
Quoted 4 lines
tools/testing/selftests/x86/Makefile +2
-1-clean: +override define CLEAN $(RM) $(BINARIES_32) $(BINARIES_64) +endefSimpler as:
EXTRA_CLEAN:= $(BINARIES_32) $(BINARIES_64)
Will send v2 with this change.
thanks,
-- Shuah
Quoted 10 lines · Shuah Khan
This patch series consists of changes to lib.mk to allow overriding common clean target from Makefiles. This fixes warnings when clean overriding and ignoring warnings. Also fixes splice clean target removing a script that runs the test from its clean target.
Shuah Khan (8):
selftests: splice: fix clean target to not remove
default_file_splice_read.sh
selftests: lib.mk: define CLEAN macro to allow Makefiles to override
clean
Applied with amended change log and Michael's ack to linux-kselftest next
Quoted 3 lines
selftests: futex: override clean in lib.mk to fix warnings
selftests: gpio: override clean in lib.mk to fix warnings
selftests: powerpc: override clean in lib.mk to fix warnings
Applied all of the above to linux-kseltftest next
Quoted 3 lines
selftests: splice: override clean in lib.mk to fix warnings
selftests: sync: override clean in lib.mk to fix warnings
selftests: x86: override clean in lib.mk to fix warnings
Applied v2s addressing Michael's comments to linux-kselftest next x86 fix also addresses not being able to build ldt_gdt
make -C tools/testing/selftests/x86 ldt_gdt
thanks,
-- Shuah