From patchwork Wed Nov 25 19:47:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaldo Carvalho de Melo X-Patchwork-Id: 57306 Delivered-To: patch@linaro.org Received: by 10.112.155.196 with SMTP id vy4csp92265lbb; Wed, 25 Nov 2015 11:47:31 -0800 (PST) X-Received: by 10.98.15.215 with SMTP id 84mr34071564pfp.49.1448480850139; Wed, 25 Nov 2015 11:47:30 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 73si36115139pfp.17.2015.11.25.11.47.29; Wed, 25 Nov 2015 11:47:30 -0800 (PST) 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 S1752682AbbKYTrY (ORCPT + 28 others); Wed, 25 Nov 2015 14:47:24 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:33995 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752469AbbKYTrS (ORCPT ); Wed, 25 Nov 2015 14:47:18 -0500 Received: from [187.65.86.84] (helo=zoo.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.80.1 #2 (Red Hat Linux)) id 1a1g24-0001Xu-UV; Wed, 25 Nov 2015 19:47:13 +0000 Received: by zoo.infradead.org (Postfix, from userid 1000) id A0EED2202CC; Wed, 25 Nov 2015 16:47:09 -0300 (BRT) From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Wang Nan , Alexei Starovoitov , Jiri Olsa , Masami Hiramatsu , Zefan Li , pi3orama@163.com, Arnaldo Carvalho de Melo Subject: [PATCH 4/4] tools lib bpf: Don't do a feature check when cleaning Date: Wed, 25 Nov 2015 16:47:02 -0300 Message-Id: <1448480822-19140-5-git-send-email-acme@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1448480822-19140-1-git-send-email-acme@kernel.org> References: <1448480822-19140-1-git-send-email-acme@kernel.org> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Nan Before this patch libbpf always do feature check even when cleaning. For example: $ cd kernel/tools/lib/bpf $ make Auto-detecting system features: ... libelf: [ on ] ... bpf: [ on ] CC libbpf.o CC bpf.o LD libbpf-in.o LINK libbpf.a LINK libbpf.so $ make clean CLEAN libbpf CLEAN core-gen $ make clean Auto-detecting system features: ... libelf: [ on ] ... bpf: [ on ] CLEAN libbpf CLEAN core-gen $ Although the first 'make clean' doesn't show feature check result, it still does the check. No output because check result is similar to FEATURE-DUMP.libbpf. This patch uses same method as perf to turn off feature checking when 'make clean'. Reported-and-Tested-by: Arnaldo Carvalho de Melo Signed-off-by: Wang Nan Cc: Alexei Starovoitov Cc: Jiri Olsa Cc: Masami Hiramatsu Cc: Zefan Li Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1448372181-151723-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/lib/bpf/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.1.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index a3caaf3eafbd..636e3ddb93a1 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -71,7 +71,17 @@ FEATURE_DISPLAY = libelf bpf INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/arch/$(ARCH)/include/uapi -I$(srctree)/include/uapi FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES) +check_feat := 1 +NON_CHECK_FEAT_TARGETS := clean TAGS tags cscope help +ifdef MAKECMDGOALS +ifeq ($(filter-out $(NON_CHECK_FEAT_TARGETS),$(MAKECMDGOALS)),) + check_feat := 0 +endif +endif + +ifeq ($(check_feat),1) include $(srctree)/tools/build/Makefile.feature +endif export prefix libdir src obj