diff options
author | Jiri Olsa <jolsa@redhat.com> | 2012-04-11 06:39:51 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-11 15:57:09 -0400 |
commit | 024e6c9747bb274c9d744ad52a987a0ebec528a6 (patch) | |
tree | e093e87fe35ef0e470570cc8cab7b2e284863c74 /tools/perf/Makefile | |
parent | ea01fa9f63aeff3ac918868217aa94adf76ddcc7 (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/perf/Makefile')
-rw-r--r-- | tools/perf/Makefile | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 4ca77cc0f284..b28b61042fa8 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
@@ -204,21 +204,20 @@ export PERL_PATH | |||
204 | FLEX = $(CROSS_COMPILE)flex | 204 | FLEX = $(CROSS_COMPILE)flex |
205 | BISON= $(CROSS_COMPILE)bison | 205 | BISON= $(CROSS_COMPILE)bison |
206 | 206 | ||
207 | event-parser: | 207 | $(OUTPUT)util/parse-events-flex.c: util/parse-events.l |
208 | $(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c | ||
209 | $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c | 208 | $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c |
210 | 209 | ||
211 | $(OUTPUT)util/parse-events-flex.c: event-parser | 210 | $(OUTPUT)util/parse-events-bison.c: util/parse-events.y |
212 | $(OUTPUT)util/parse-events-bison.c: event-parser | 211 | $(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c |
213 | 212 | ||
214 | pmu-parser: | 213 | $(OUTPUT)util/pmu-flex.c: util/pmu.l |
215 | $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c | ||
216 | $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c | 214 | $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c |
217 | 215 | ||
218 | $(OUTPUT)util/pmu-flex.c: pmu-parser | 216 | $(OUTPUT)util/pmu-bison.c: util/pmu.y |
219 | $(OUTPUT)util/pmu-bison.c: pmu-parser | 217 | $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c |
220 | 218 | ||
221 | $(OUTPUT)util/parse-events.o: event-parser pmu-parser | 219 | $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c |
220 | $(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c | ||
222 | 221 | ||
223 | LIB_FILE=$(OUTPUT)libperf.a | 222 | LIB_FILE=$(OUTPUT)libperf.a |
224 | 223 | ||
@@ -807,8 +806,6 @@ help: | |||
807 | @echo ' html - make html documentation' | 806 | @echo ' html - make html documentation' |
808 | @echo ' info - make GNU info documentation (access with info <foo>)' | 807 | @echo ' info - make GNU info documentation (access with info <foo>)' |
809 | @echo ' pdf - make pdf documentation' | 808 | @echo ' pdf - make pdf documentation' |
810 | @echo ' event-parser - make event parser code' | ||
811 | @echo ' pmu-parser - make pmu format parser code' | ||
812 | @echo ' TAGS - use etags to make tag information for source browsing' | 809 | @echo ' TAGS - use etags to make tag information for source browsing' |
813 | @echo ' tags - use ctags to make tag information for source browsing' | 810 | @echo ' tags - use ctags to make tag information for source browsing' |
814 | @echo ' cscope - use cscope to make interactive browsing database' | 811 | @echo ' cscope - use cscope to make interactive browsing database' |