Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756036AbbLGKtf (ORCPT ); Mon, 7 Dec 2015 05:49:35 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:46778 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754647AbbLGKtd (ORCPT ); Mon, 7 Dec 2015 05:49:33 -0500 From: Wang Nan To: , CC: , , , Wang Nan , Jiri Olsa Subject: [PATCH] tools build: Remove FEATURE-DUMP Date: Mon, 7 Dec 2015 10:48:58 +0000 Message-ID: <1449485338-62100-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <566561BA.30909@huawei.com> References: <566561BA.30909@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.5665642E.0145,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: c135827416fdc25ae5e9cd6c8ccab08a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4599 Lines: 113 Jiri introduces a FEATURE-INCLUDE file for feature checking. It contains same information with FEATURE-DUMP, so we can avoid generating FEATURE-DUMP. Following modification should ensure FEATURE_TESTS contains FEATURE_DISPLAY. Signed-off-by: Wang Nan Cc: Jiri Olsa --- I haven't thoroughly tested this patch, just want to show the possibility of removing FEATURE-DUMP. I don't insist on this. Jiri, if you find this patch is not good please simply ignore it. Thank you. --- tools/build/Makefile.feature | 8 +++----- tools/lib/bpf/.gitignore | 1 - tools/lib/bpf/Makefile | 2 +- tools/perf/.gitignore | 1 - tools/perf/Makefile.perf | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature index 51f8d59..98a13bd 100644 --- a/tools/build/Makefile.feature +++ b/tools/build/Makefile.feature @@ -123,10 +123,6 @@ define feature_print_text_code MSG = $(shell printf '...%30s: %s' $(1) $(2)) endef -FEATURE_DUMP_FILENAME = $(OUTPUT)FEATURE-DUMP$(FEATURE_USER) -FEATURE_DUMP := $(foreach feat,$(FEATURE_DISPLAY),feature-$(feat)($(feature-$(feat)))) -FEATURE_DUMP_FILE := $(shell touch $(FEATURE_DUMP_FILENAME); cat $(FEATURE_DUMP_FILENAME)) - ifeq ($(dwarf-post-unwind),1) FEATURE_DUMP += dwarf-post-unwind($(dwarf-post-unwind-text)) endif @@ -141,6 +137,9 @@ endif # features detection state. FEATURE_INCLUDE_FILENAME = $(OUTPUT)FEATURE-INCLUDE$(FEATURE_USER) +FEATURE_DUMP := $(foreach feat,$(FEATURE_DISPLAY),feature-$(feat)=$(feature-$(feat))) +FEATURE_DUMP_FILE := $(foreach feat,$(FEATURE_DISPLAY),$(shell touch $(FEATURE_INCLUDE_FILENAME); cat $(FEATURE_INCLUDE_FILENAME) | grep 'feature-$(feat)=')) + # The $(feature_display) controls the default detection message # output. It's set if: # - detected features differes from stored features from @@ -149,7 +148,6 @@ FEATURE_INCLUDE_FILENAME = $(OUTPUT)FEATURE-INCLUDE$(FEATURE_USER) # - VF is enabled ifneq ("$(FEATURE_DUMP)","$(FEATURE_DUMP_FILE)") - $(shell echo "$(FEATURE_DUMP)" > $(FEATURE_DUMP_FILENAME)) $(shell rm -f $(FEATURE_INCLUDE_FILENAME)) $(foreach feat,$(FEATURE_TESTS),$(shell echo "feature-$(feat)=$(feature-$(feat))" >> $(FEATURE_INCLUDE_FILENAME))) feature_display := 1 diff --git a/tools/lib/bpf/.gitignore b/tools/lib/bpf/.gitignore index 4019b8e..c4cc003 100644 --- a/tools/lib/bpf/.gitignore +++ b/tools/lib/bpf/.gitignore @@ -1,3 +1,2 @@ libbpf_version.h -FEATURE-DUMP.libbpf FEATURE-INCLUDE.libbpf diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile index 6b9af77..6bc3cb5 100644 --- a/tools/lib/bpf/Makefile +++ b/tools/lib/bpf/Makefile @@ -194,7 +194,7 @@ config-clean: clean: $(call QUIET_CLEAN, libbpf) $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d \ $(RM) LIBBPF-CFLAGS - $(call QUIET_CLEAN, core-gen) $(RM) $(OUTPUT)FEATURE-DUMP.libbpf $(OUTPUT)FEATURE-INCLUDE.libbpf + $(call QUIET_CLEAN, core-gen) $(RM) $(OUTPUT)FEATURE-INCLUDE.libbpf diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore index 4a3eb8d..5e93718 100644 --- a/tools/perf/.gitignore +++ b/tools/perf/.gitignore @@ -1,7 +1,6 @@ PERF-CFLAGS PERF-GUI-VARS PERF-VERSION-FILE -FEATURE-DUMP FEATURE-INCLUDE perf perf-read-vdso32 diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf index 7338a7e..7cccf11 100644 --- a/tools/perf/Makefile.perf +++ b/tools/perf/Makefile.perf @@ -589,7 +589,7 @@ clean: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean config-clean $(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete $(Q)$(RM) $(OUTPUT).config-detected $(call QUIET_CLEAN, core-progs) $(RM) $(ALL_PROGRAMS) perf perf-read-vdso32 perf-read-vdsox32 - $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)FEATURE-INCLUDE $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \ + $(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-INCLUDE $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \ $(OUTPUT)util/intel-pt-decoder/inat-tables.c $(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean $(python-clean) -- 1.8.3.4 -- 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/