提交 2209001f 编写于 作者: B Borislav Petkov 提交者: Arnaldo Carvalho de Melo

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: NBorislav Petkov <bp@suse.de>
Link: http://lkml.kernel.org/r/1359979554-9160-1-git-send-email-bp@alien8.deSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 74b2133d
...@@ -149,6 +149,8 @@ RM = rm -f ...@@ -149,6 +149,8 @@ RM = rm -f
MKDIR = mkdir MKDIR = mkdir
FIND = find FIND = find
INSTALL = install INSTALL = install
FLEX = flex
BISON= bison
# sparse is architecture-neutral, which means that we need to tell it # sparse is architecture-neutral, which means that we need to tell it
# explicitly what architecture to check for. Fix this up for yours.. # explicitly what architecture to check for. Fix this up for yours..
...@@ -158,6 +160,14 @@ ifneq ($(MAKECMDGOALS),clean) ...@@ -158,6 +160,14 @@ ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),tags) ifneq ($(MAKECMDGOALS),tags)
-include config/feature-tests.mak -include config/feature-tests.mak
ifeq ($(call get-executable,$(FLEX)),)
dummy := $(error Error: $(FLEX) is missing on this system, please install it)
endif
ifeq ($(call get-executable,$(BISON)),)
dummy := $(error Error: $(BISON) is missing on this system, please install it)
endif
ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y) ifeq ($(call try-cc,$(SOURCE_HELLO),$(CFLAGS) -Werror -fstack-protector-all,-fstack-protector-all),y)
CFLAGS := $(CFLAGS) -fstack-protector-all CFLAGS := $(CFLAGS) -fstack-protector-all
endif endif
...@@ -282,9 +292,6 @@ endif ...@@ -282,9 +292,6 @@ endif
export PERL_PATH export PERL_PATH
FLEX = flex
BISON= bison
$(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(OUTPUT)util/parse-events-bison.c
$(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 $(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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册