[PATCH 04/13] perf build: Fix single target build dependency check
From: Arnaldo Carvalho de Melo
Date: Tue Jun 23 2015 - 17:48:22 EST
From: Jiri Olsa <jolsa@xxxxxxxxxx>
Currently if we build a 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 will not 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 rebuild it and
it's also resolved as '%' target.
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxxxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Lukas Wunner <lukas@xxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Link: http://lkml.kernel.org/r/1434977452-32520-4-git-send-email-jolsa@xxxxxxxxxx
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
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
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/