aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJiri Olsa <jolsa@redhat.com>2012-04-11 06:39:51 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-04-14 12:49:43 -0400
commit2a5204fed0f313f9b55a7b4d5f48ca484446d095 (patch)
treec835bd525022202bd2f2ac5875cb765c0381bacf /tools
parentf755397211745e26a4cc693a195982de6c454edd (diff)
perf tools: Fix parsers' rules to dependencies
Currently the parsers objects (bison/flex related) are each time perf is built. No matter the generated files are already in place, the parser generation is executed every time. Changing the rules to have proper flex/bison objects generation dependencies. The parsers code is not rebuilt until the flex/bison source files are touched. Also when flex/bison source is changed, only dependent objects are rebuilt. Signed-off-by: Jiri Olsa <jolsa@redhat.com> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1334140791-3024-1-git-send-email-jolsa@redhat.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Makefile19
1 files changed, 8 insertions, 11 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index a20d0c599b22..03059e75665a 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -237,21 +237,20 @@ export PERL_PATH
237FLEX = $(CROSS_COMPILE)flex 237FLEX = $(CROSS_COMPILE)flex
238BISON= $(CROSS_COMPILE)bison 238BISON= $(CROSS_COMPILE)bison
239 239
240event-parser: 240$(OUTPUT)util/parse-events-flex.c: util/parse-events.l
241 $(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
242 $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c 241 $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
243 242
244$(OUTPUT)util/parse-events-flex.c: event-parser 243$(OUTPUT)util/parse-events-bison.c: util/parse-events.y
245$(OUTPUT)util/parse-events-bison.c: event-parser 244 $(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
246 245
247pmu-parser: 246$(OUTPUT)util/pmu-flex.c: util/pmu.l
248 $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c
249 $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c 247 $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c
250 248
251$(OUTPUT)util/pmu-flex.c: pmu-parser 249$(OUTPUT)util/pmu-bison.c: util/pmu.y
252$(OUTPUT)util/pmu-bison.c: pmu-parser 250 $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c
253 251
254$(OUTPUT)util/parse-events.o: event-parser pmu-parser 252$(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
253$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
255 254
256LIB_FILE=$(OUTPUT)libperf.a 255LIB_FILE=$(OUTPUT)libperf.a
257 256
@@ -852,8 +851,6 @@ help:
852 @echo ' html - make html documentation' 851 @echo ' html - make html documentation'
853 @echo ' info - make GNU info documentation (access with info <foo>)' 852 @echo ' info - make GNU info documentation (access with info <foo>)'
854 @echo ' pdf - make pdf documentation' 853 @echo ' pdf - make pdf documentation'
855 @echo ' event-parser - make event parser code'
856 @echo ' pmu-parser - make pmu format parser code'
857 @echo ' TAGS - use etags to make tag information for source browsing' 854 @echo ' TAGS - use etags to make tag information for source browsing'
858 @echo ' tags - use ctags to make tag information for source browsing' 855 @echo ' tags - use ctags to make tag information for source browsing'
859 @echo ' cscope - use cscope to make interactive browsing database' 856 @echo ' cscope - use cscope to make interactive browsing database'