]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
selftests: lib.mk: define CLEAN macro to allow Makefiles to override clean
authorShuah Khan <shuahkh@osg.samsung.com>
Fri, 21 Apr 2017 22:07:51 +0000 (16:07 -0600)
committerShuah Khan <shuahkh@osg.samsung.com>
Tue, 25 Apr 2017 15:46:45 +0000 (09:46 -0600)
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'

Fixes: 88baa78d1f31 ("selftests: remove duplicated all and clean target")
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/lib.mk

index 775c589ac3c0a24f470a8f53ae52f6c82cc17193..959273c3a52e10f5895735b047a3de389e4f161a 100644 (file)
@@ -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 $@