From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>,
lkml <linux-kernel@vger.kernel.org>,
David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 1/3] tools build: Introduce features dump include makefile
Date: Thu, 26 Nov 2015 14:54:02 +0100 [thread overview]
Message-ID: <1448546044-28973-1-git-send-email-jolsa@kernel.org> (raw)
Creating the FEATURE-INCLUDE file, that contains all features
status dumped in make's variable format:
...
feature-backtrace=1
feature-dwarf=1
...
It's purpose is to be included in sub-project makefiles to get
features detection state. This way we can run the detection only
in top level project and propagate it down.
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-fcq5rtdhcu4300sjp2p8l936@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
tools/build/Makefile.feature | 12 ++++++++++++
tools/perf/.gitignore | 1 +
tools/perf/Makefile.perf | 2 +-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/tools/build/Makefile.feature b/tools/build/Makefile.feature
index 37ff4c9f92f1..51f8d5928f98 100644
--- a/tools/build/Makefile.feature
+++ b/tools/build/Makefile.feature
@@ -131,6 +131,16 @@ ifeq ($(dwarf-post-unwind),1)
FEATURE_DUMP += dwarf-post-unwind($(dwarf-post-unwind-text))
endif
+# The FEATURE-INCLUDE file contains all features status
+# dumped in make's variable format:
+# ...
+# feature-backtrace=1
+# feature-dwarf=1
+# ...
+# It's to be included in sub-project makefiles to get
+# features detection state.
+FEATURE_INCLUDE_FILENAME = $(OUTPUT)FEATURE-INCLUDE$(FEATURE_USER)
+
# The $(feature_display) controls the default detection message
# output. It's set if:
# - detected features differes from stored features from
@@ -140,6 +150,8 @@ endif
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
endif
diff --git a/tools/perf/.gitignore b/tools/perf/.gitignore
index 3d1bb802dbf4..4a3eb8dedc54 100644
--- a/tools/perf/.gitignore
+++ b/tools/perf/.gitignore
@@ -2,6 +2,7 @@ PERF-CFLAGS
PERF-GUI-VARS
PERF-VERSION-FILE
FEATURE-DUMP
+FEATURE-INCLUDE
perf
perf-read-vdso32
perf-read-vdsox32
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 0d19d5447d6c..97badfa2a195 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)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-DUMP $(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)
--
2.4.3
next reply other threads:[~2015-11-26 13:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-26 13:54 Jiri Olsa [this message]
2015-11-26 13:54 ` [PATCH 2/3] perf build: Use FEATURE-INCLUDE in bpf subproject Jiri Olsa
2015-11-26 16:31 ` Arnaldo Carvalho de Melo
2015-11-26 18:11 ` Jiri Olsa
2015-11-26 18:12 ` Jiri Olsa
2015-11-26 18:50 ` [PATCH] tools build: Use fixdep with OUTPUT path prefix Jiri Olsa
2015-11-26 19:31 ` Arnaldo Carvalho de Melo
2015-11-27 7:45 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-11-26 13:54 ` [PATCH 3/3] perf build: Fix traceevent plugins build race Jiri Olsa
2015-11-26 16:36 ` Arnaldo Carvalho de Melo
2015-11-27 7:44 ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-11-26 16:23 ` [PATCH 1/3] tools build: Introduce features dump include makefile Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448546044-28973-1-git-send-email-jolsa@kernel.org \
--to=jolsa@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@kernel.org \
--cc=dsahern@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=wangnan0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.