Message ID | b39e21f8c47318d82be999aae310bdf6bcfc9bb9.1492815938.git.shuahkh@osg.samsung.com |
---|---|
State | New |
Headers | show |
Shuah Khan <shuahkh@osg.samsung.com> writes: > 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 <shuahkh@osg.samsung.com> Should probably have: Fixes: 88baa78d1f31 ("selftests: remove duplicated all and clean target") 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. Acked-by: Michael Ellerman <mpe@ellerman.id.au> cheers -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Shuah Khan > 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 <shuahkh@osg.samsung.com> > --- > tools/testing/selftests/lib.mk | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk > 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) > > -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 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 04/24/2017 09:45 AM, David Laight wrote: > From: Shuah Khan >> 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 <shuahkh@osg.samsung.com> >> --- >> tools/testing/selftests/lib.mk | 6 +++++- >> 1 file changed, 5 insertions(+), 1 deletion(-) >> >> diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk >> 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) >> >> -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 > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 04/21/2017 11:38 PM, Michael Ellerman wrote: > Shuah Khan <shuahkh@osg.samsung.com> writes: > >> 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 <shuahkh@osg.samsung.com> > > Should probably have: > > Fixes: 88baa78d1f31 ("selftests: remove duplicated all and clean target") Amended the change log to add the above. > > > 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. > > This patch is a good solution to fix the warnings. > > Acked-by: Michael Ellerman <mpe@ellerman.id.au> > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Shuah Khan <shuahkh@osg.samsung.com> writes: > On 04/21/2017 11:38 PM, Michael Ellerman wrote: >> Shuah Khan <shuahkh@osg.samsung.com> writes: >> This patch is a good solution to fix the warnings. >> >> Acked-by: Michael Ellerman <mpe@ellerman.id.au> > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk 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) -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 $@
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 <shuahkh@osg.samsung.com> --- tools/testing/selftests/lib.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)