aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Makefile.perf
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2014-02-19 05:21:40 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2014-02-24 07:29:35 -0500
commitda237ed07c5144b0330a38b9b68be167231255d0 (patch)
treedfad36ea2f7c9e55fa8531733d249ae860c14b95 /tools/perf/Makefile.perf
parent2a94f6c455b38c0411d92b0df794bb8137bf1957 (diff)
perf tools: Fix bison OUTPUT directories dependency
The bison and flex C objects don't have dependency for creating output directories. This could lead to build failure if the one of those objects is picked up by make to be build as the first one (reported by Arnaldo). Also following make fails: $ rm -rf /tmp/krava; mkdir /tmp/krava; make O=/tmp/krava util/pmu-bison.o BUILD: Doing 'make -j4' parallel build [ SNIP ] BISON /tmp/krava/util/pmu-bison.c FLAGS: * new build flags or prefix bison: /tmp/krava/util/pmu-bison.output: cannot open: No such file or directory make[1]: *** [/tmp/krava/util/pmu-bison.c] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [util/pmu-bison.o] Error 2 Adding bison objects dependency for output directories (flex objects depends on bisons'). This fixies the make_util_pmu_bison_o_O make test. Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1392805300-14610-3-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/Makefile.perf')
-rw-r--r--tools/perf/Makefile.perf10
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 77b153fa23a5..5fedd6946f32 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -712,9 +712,15 @@ $(patsubst perf-%,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
712# we depend the various files onto their directories. 712# we depend the various files onto their directories.
713DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(GTK_OBJS) 713DIRECTORY_DEPS = $(LIB_OBJS) $(BUILTIN_OBJS) $(GTK_OBJS)
714DIRECTORY_DEPS += $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h 714DIRECTORY_DEPS += $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h
715$(DIRECTORY_DEPS): | $(sort $(dir $(DIRECTORY_DEPS))) 715# no need to add flex objects, because they depend on bison ones
716DIRECTORY_DEPS += $(OUTPUT)util/parse-events-bison.c
717DIRECTORY_DEPS += $(OUTPUT)util/pmu-bison.c
718
719OUTPUT_DIRECTORIES := $(sort $(dir $(DIRECTORY_DEPS)))
720
721$(DIRECTORY_DEPS): | $(OUTPUT_DIRECTORIES)
716# In the second step, we make a rule to actually create these directories 722# In the second step, we make a rule to actually create these directories
717$(sort $(dir $(DIRECTORY_DEPS))): 723$(OUTPUT_DIRECTORIES):
718 $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null 724 $(QUIET_MKDIR)$(MKDIR) -p $@ 2>/dev/null
719 725
720$(LIB_FILE): $(LIB_OBJS) 726$(LIB_FILE): $(LIB_OBJS)