Thread (27 messages) 27 messages, 5 authors, 2017-04-27

RE: [PATCH 2/8] selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean

From: David Laight <hidden>
Date: 2017-04-24 15:47:30
Also in: linux-gpio, lkml

From: Shuah Khan
quoted hunk ↗ jump to hunk
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:
=20
warning: overriding recipe for target 'clean'
../lib.mk:55: warning: ignoring old recipe for target 'clean'
=20
Signed-off-by: Shuah Khan <redacted>
---
 tools/testing/selftests/lib.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
=20
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib=
.mk
quoted hunk ↗ jump to hunk
index 775c589..959273c 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -51,8 +51,12 @@ endef
 emit_tests:
 	$(EMIT_TESTS)
=20
-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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help