aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2013-02-04 07:05:54 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-02-06 16:09:25 -0500
commit2209001fd895e8932ae2c85bfca233758234499a (patch)
tree879738da172ae13b897737858f578f39b0a86fee /tools
parent74b2133d19e776924b2773e27dd9d6940f1cc594 (diff)
perf tools: Check for flex and bison before continuing building
Check whether both executables are present on the system before continuing with the build instead of failing halfway, if either are missing. Signed-off-by: Borislav Petkov <bp@suse.de> Link: http://lkml.kernel.org/r/1359979554-9160-1-git-send-email-bp@alien8.de Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 4b1044cbd84c..a158309a65ef 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -149,6 +149,8 @@ RM = rm -f
149MKDIR = mkdir 149MKDIR = mkdir
150FIND = find 150FIND = find
151INSTALL = install 151INSTALL = install
152FLEX = flex
153BISON= bison
152 154
153# sparse is architecture-neutral, which means that we need to tell it 155# sparse is architecture-neutral, which means that we need to tell it
154# explicitly what architecture to check for. Fix this up for yours.. 156# explicitly what architecture to check for. Fix this up for yours..
@@ -158,6 +160,14 @@ ifneq ($(MAKECMDGOALS),clean)
158ifneq ($(MAKECMDGOALS),tags) 160ifneq ($(MAKECMDGOALS),tags)
159-include config/feature-tests.mak 161-include config/feature-tests.mak
160 162
163ifeq ($(call get-executable,$(FLEX)),)
164 dummy := $(error Error: $(FLEX) is missing on this system, please install it)
165endif
166
167ifeq ($(call get-executable,$(BISON)),)
168 dummy := $(error Error: $(BISON) is missing on this system, please install it)
169endif
170
161ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y) 171ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
162 CFLAGS := $(CFLAGS) -fstack-protector-all 172 CFLAGS := $(CFLAGS) -fstack-protector-all
163endif 173endif
@@ -282,9 +292,6 @@ endif
282 292
283export PERL_PATH 293export PERL_PATH
284 294
285FLEX = flex
286BISON= bison
287
288$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c 295$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
289 $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c 296 $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h $(PARSER_DEBUG_FLEX) -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c
290 297