Commit 2a5204fe authored by Jiri Olsa's avatar Jiri Olsa Committed by Arnaldo Carvalho de Melo

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: default avatarJiri 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.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f7553972
...@@ -237,21 +237,20 @@ export PERL_PATH ...@@ -237,21 +237,20 @@ export PERL_PATH
FLEX = $(CROSS_COMPILE)flex FLEX = $(CROSS_COMPILE)flex
BISON= $(CROSS_COMPILE)bison BISON= $(CROSS_COMPILE)bison
event-parser: $(OUTPUT)util/parse-events-flex.c: util/parse-events.l
$(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
$(OUTPUT)util/parse-events-flex.c: event-parser $(OUTPUT)util/parse-events-bison.c: util/parse-events.y
$(OUTPUT)util/parse-events-bison.c: event-parser $(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c
pmu-parser: $(OUTPUT)util/pmu-flex.c: util/pmu.l
$(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c
$(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c
$(OUTPUT)util/pmu-flex.c: pmu-parser $(OUTPUT)util/pmu-bison.c: util/pmu.y
$(OUTPUT)util/pmu-bison.c: pmu-parser $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c
$(OUTPUT)util/parse-events.o: event-parser pmu-parser $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c
$(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
LIB_FILE=$(OUTPUT)libperf.a LIB_FILE=$(OUTPUT)libperf.a
...@@ -852,8 +851,6 @@ help: ...@@ -852,8 +851,6 @@ help:
@echo ' html - make html documentation' @echo ' html - make html documentation'
@echo ' info - make GNU info documentation (access with info <foo>)' @echo ' info - make GNU info documentation (access with info <foo>)'
@echo ' pdf - make pdf documentation' @echo ' pdf - make pdf documentation'
@echo ' event-parser - make event parser code'
@echo ' pmu-parser - make pmu format parser code'
@echo ' TAGS - use etags to make tag information for source browsing' @echo ' TAGS - use etags to make tag information for source browsing'
@echo ' tags - use ctags to make tag information for source browsing' @echo ' tags - use ctags to make tag information for source browsing'
@echo ' cscope - use cscope to make interactive browsing database' @echo ' cscope - use cscope to make interactive browsing database'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment