Received: by 10.192.165.156 with SMTP id m28csp2336153imm; Thu, 12 Apr 2018 12:32:05 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/a2H+YBiDrky3dco7+ZQyL89YbwFpRUIK35HbvFJgDEcJJVFmFQDqfdxsLIPMsyYKAzQpH X-Received: by 2002:a17:902:8b89:: with SMTP id ay9-v6mr2376927plb.306.1523561525931; Thu, 12 Apr 2018 12:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523561525; cv=none; d=google.com; s=arc-20160816; b=X/rYlSQ3enMjNfqw3CRGRT2VENvea4srsNFhOhNr7NpuexI4Onv8aa7Upcgzw00cuM K1rrgyShTCQ4Qw1SKVmaFhanm//+8zU+hnRmkCvs2Ce5W8aQgG+40hJdzSVFCpyAtZx5 ycGdEJ5PoZDBftVqtzehKvtTJj3kSGO74Lwob9IRx2HjHJtJyMI5aYGDc5KmHpzRfoUY GHecsCsgAilJ269VTkk67Ql+/lIAgHA2hfD0FXtnp9WU81gOjtlJjxCisztrtXfynLm/ yOkaHZUMGudtZgAMP6H/08tCrOwZNeiKamguM1dQjCowWHMeef/0oruboiIb0pluNV/4 BgPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=7JlaULysr9kTlzpddmC3wuiRCAWSV1KqT18S4yPnoW4=; b=SuwsnHc2f9qyByGSET1w72/eQx32pAoM8ddyecvuUgptaOYMo6epkz61jP3MjxOsAY A2BllQuidS2+ayCfgE0AzXcy+ZvlcahIVP4KxZYR6o1GklozDga/CO38EDY10c9Yykjp e3vNEp/q/LhXEIhMLnFG0XhbkGNa0/0b0mi3dJj3dAKuTrvda/PTZtp9/HYc3gMvh+Zh ZF42JsHkt82W/DGaaeymabbGpQBTT9A8MtrF9BsSTkpzCFZh9EuGgfkOS7rk3pHBIcsf julUartEDxRdCZLpVT+HgtGhE7jWezJdnQ/4E2ZLSh+bbuVqXljOwo3YEwyxC5MUew00 X+2w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b73si2611580pga.788.2018.04.12.12.31.52; Thu, 12 Apr 2018 12:32:05 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753928AbeDLTaZ (ORCPT + 99 others); Thu, 12 Apr 2018 15:30:25 -0400 Received: from mail.efficios.com ([167.114.142.138]:45604 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753411AbeDLT20 (ORCPT ); Thu, 12 Apr 2018 15:28:26 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 14F731B0777; Thu, 12 Apr 2018 15:28:26 -0400 (EDT) Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail02.efficios.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id QAeTPlw0681O; Thu, 12 Apr 2018 15:28:25 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.efficios.com (Postfix) with ESMTP id 68E421B0762; Thu, 12 Apr 2018 15:28:25 -0400 (EDT) X-Virus-Scanned: amavisd-new at efficios.com Received: from mail.efficios.com ([127.0.0.1]) by localhost (mail02.efficios.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id EP9L_-QXGg2t; Thu, 12 Apr 2018 15:28:25 -0400 (EDT) Received: from thinkos.internal.efficios.com (192-222-157-41.qc.cable.ebox.net [192.222.157.41]) by mail.efficios.com (Postfix) with ESMTPSA id 03A821B0741; Thu, 12 Apr 2018 15:28:25 -0400 (EDT) From: Mathieu Desnoyers To: Peter Zijlstra , "Paul E . McKenney" , Boqun Feng , Andy Lutomirski , Dave Watson Cc: linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Paul Turner , Andrew Morton , Russell King , Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , Andrew Hunter , Andi Kleen , Chris Lameter , Ben Maurer , Steven Rostedt , Josh Triplett , Linus Torvalds , Catalin Marinas , Will Deacon , Michael Kerrisk , Mathieu Desnoyers , linux-kselftest@vger.kernel.org Subject: [RFC PATCH for 4.18 16/23] selftests: lib.mk: Introduce OVERRIDE_TARGETS Date: Thu, 12 Apr 2018 15:27:53 -0400 Message-Id: <20180412192800.15708-17-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180412192800.15708-1-mathieu.desnoyers@efficios.com> References: <20180412192800.15708-1-mathieu.desnoyers@efficios.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Shuah Khan CC: Russell King CC: Catalin Marinas CC: Will Deacon CC: Thomas Gleixner CC: Paul Turner CC: Andrew Hunter CC: Peter Zijlstra CC: Andy Lutomirski CC: Andi Kleen CC: Dave Watson CC: Chris Lameter CC: Ingo Molnar CC: "H. Peter Anvin" CC: Ben Maurer CC: Steven Rostedt CC: "Paul E. McKenney" CC: Josh Triplett CC: Linus Torvalds CC: Andrew Morton CC: Boqun Feng CC: linux-kselftest@vger.kernel.org CC: linux-api@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 7de482a0519d..3d4bdeb072b2 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 -- 2.11.0