mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: lkml <linux-kernel@vger.kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Andi Kleen <ak@linux.intel.com>, David Ahern <dsahern@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Stephane Eranian <eranian@google.com>,
	Lukas Wunner <lukas@wunner.de>
Subject: [PATCH 3/3] perf build: Fix single target build dependency check
Date: Mon, 22 Jun 2015 14:50:52 +0200	[thread overview]
Message-ID: <1434977452-32520-4-git-send-email-jolsa@kernel.org> (raw)
In-Reply-To: <1434977452-32520-1-git-send-email-jolsa@kernel.org>

Currently if we build single target like:

  $ touch util/map.c && make util/map.o

It will not rebuild util/map.o if it already exists
and util/map.c is modified.

The reason is that the top-level 'Makefile' processes
util/map.o as an implicit rule and if util/map.o exists
make considers the 'util/map.o' target as done and  wouldn't
nest into Makefile.perf.

Adding FORCE for '%', because that's what we want to nest
into Makefile.perf for any target.

Adding Makefile into phony targets, because make tries to
rebuilt it and it's also resolved as '%' target.

Link: http://lkml.kernel.org/n/tip-yrix4k0nb2fgmtzvmvxr23ps@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
 tools/perf/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index d31a7bbd7cee..480546d5f13b 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -83,8 +83,8 @@ build-test:
 #
 # All other targets get passed through:
 #
-%:
+%: FORCE
 	$(print_msg)
 	$(make)
 
-.PHONY: tags TAGS
+.PHONY: tags TAGS FORCE Makefile
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

  parent reply	other threads:[~2015-06-22 12:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 12:50 [PATCH 0/3] perf tool: Build fixes Jiri Olsa
2015-06-22 12:50 ` [PATCH 1/3] perf tests: Add testing for Makefile.perf Jiri Olsa
2015-06-25  7:55   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-06-22 12:50 ` [PATCH 2/3] perf tests: Add test for make install with prefix Jiri Olsa
2015-06-25  7:55   ` [tip:perf/core] " tip-bot for Jiri Olsa
2015-06-22 12:50 ` Jiri Olsa [this message]
2015-06-25  7:56   ` [tip:perf/core] perf build: Fix single target build dependency check tip-bot for Jiri Olsa

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=1434977452-32520-4-git-send-email-jolsa@kernel.org \
    --to=jolsa@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=dsahern@gmail.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    /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®