From: tip-bot for Ingo Molnar <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, hpa@zytor.com,
mingo@kernel.org, a.p.zijlstra@chello.nl, namhyung@kernel.org,
jolsa@redhat.com, dsahern@gmail.com, tglx@linutronix.de
Subject: [tip:perf/core] tools/perf/build: Add 'autodep' functionality, generate feature test dependencies automatically
Date: Mon, 14 Oct 2013 22:12:50 -0700 [thread overview]
Message-ID: <tip-8b6eb56a9570001634df1d2c7f38e7179a357362@git.kernel.org> (raw)
Commit-ID: 8b6eb56a9570001634df1d2c7f38e7179a357362
Gitweb: http://git.kernel.org/tip/8b6eb56a9570001634df1d2c7f38e7179a357362
Author: Ingo Molnar <mingo@kernel.org>
AuthorDate: Mon, 30 Sep 2013 13:51:28 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 9 Oct 2013 08:48:29 +0200
tools/perf/build: Add 'autodep' functionality, generate feature test dependencies automatically
Use GCC's -MD feature to generate a dependency file for each feature test .c file,
and include that .d file in the config/feature-checks/Makefile.
This allows us to do two things:
- speed up feature tests
- detect removal or changes in build dependencies - including system libraries/headers
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/n/tip-Jfma8pmPnnqzpxjbs3hpgmsj@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/perf/config/feature-checks/Makefile | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index b3f6372..4708cca 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -1,16 +1,20 @@
FILES=test-hello
+CC := $(CC) -MD
+
all: $(FILES)
BUILD = $(CC) -o $(OUTPUT)$@ $@.c
###############################
-test-hello: test-hello.c
+test-hello:
$(BUILD)
+-include *.d */*.d
+
###############################
clean:
- rm -f $(FILES)
+ rm -f $(FILES) *.d
reply other threads:[~2013-10-15 5:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=tip-8b6eb56a9570001634df1d2c7f38e7179a357362@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®