On 11/21/2017 03:19 PM, Mathieu Desnoyers wrote: > Introduce OVERRIDE_TARGETS to allow tests to express dependencies on > header files and .so, which require to override the selftests lib.mk > targets. > > Signed-off-by: Mathieu Desnoyers <mathieu.desnoy...@efficios.com> > CC: Russell King <li...@arm.linux.org.uk> > CC: Catalin Marinas <catalin.mari...@arm.com> > CC: Will Deacon <will.dea...@arm.com> > CC: Thomas Gleixner <t...@linutronix.de> > CC: Paul Turner <p...@google.com> > CC: Andrew Hunter <a...@google.com> > CC: Peter Zijlstra <pet...@infradead.org> > CC: Andy Lutomirski <l...@amacapital.net> > CC: Andi Kleen <a...@firstfloor.org> > CC: Dave Watson <davejwat...@fb.com> > CC: Chris Lameter <c...@linux.com> > CC: Ingo Molnar <mi...@redhat.com> > CC: "H. Peter Anvin" <h...@zytor.com> > CC: Ben Maurer <bmau...@fb.com> > CC: Steven Rostedt <rost...@goodmis.org> > CC: "Paul E. McKenney" <paul...@linux.vnet.ibm.com> > CC: Josh Triplett <j...@joshtriplett.org> > CC: Linus Torvalds <torva...@linux-foundation.org> > CC: Andrew Morton <a...@linux-foundation.org> > CC: Boqun Feng <boqun.f...@gmail.com> > CC: Shuah Khan <sh...@kernel.org> > CC: linux-kselft...@vger.kernel.org > CC: linux-...@vger.kernel.org > --- > tools/testing/selftests/lib.mk | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk > index 5bef05d6ba39..441d7bc63bb7 100644 > --- a/tools/testing/selftests/lib.mk > +++ b/tools/testing/selftests/lib.mk > @@ -105,6 +105,9 @@ COMPILE.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c > LINK.S = $(CC) $(ASFLAGS) $(CPPFLAGS) $(LDFLAGS) $(TARGET_ARCH) > endif > > +# Selftest makefiles can override those targets by setting > +# OVERRIDE_TARGETS = 1. > +ifeq ($(OVERRIDE_TARGETS),) > $(OUTPUT)/%:%.c > $(LINK.c) $^ $(LDLIBS) -o $@ > > @@ -113,5 +116,6 @@ $(OUTPUT)/%.o:%.S > > $(OUTPUT)/%:%.S > $(LINK.S) $^ $(LDLIBS) -o $@ > +endif > > .PHONY: run_tests all clean install emit_tests >
Thanks for splitting this patch. It will make it easier since it is kselftest framework change. Acked-by: Shuah Khan <shua...@osg.samsung.com> thanks, -- Shuah