From 833e622459432ed5bc7cc58ffadb91b59c863a3a Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 23 Mar 2018 22:04:32 +0900 Subject: genksyms: generate lexer and parser during build instead of shipping Now that the kernel build supports flex and bison, remove the _shipped files and generate them during the build instead. There are no more shipped lexer and parser, so I ripped off the rules in scripts/Malefile.lib that were used for REGENERATE_PARSERS. The genksyms parser has ambiguous grammar, which would emit warnings: scripts/genksyms/parse.y: warning: 9 shift/reduce conflicts [-Wconflicts-sr] scripts/genksyms/parse.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr] They are normally suppressed, but displayed when W=1 is given. Signed-off-by: Masahiro Yamada --- scripts/Makefile.lib | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'scripts/Makefile.lib') diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 45b9aa3ca39e..b1d938fab73b 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -184,14 +184,8 @@ endef quiet_cmd_flex = LEX $@ cmd_flex = $(LEX) -o$@ -L $< -ifdef REGENERATE_PARSERS -.PRECIOUS: $(src)/%.lex.c_shipped -$(src)/%.lex.c_shipped: $(src)/%.l - $(call cmd,flex) -endif - .PRECIOUS: $(obj)/%.lex.c -$(filter %.lex.c,$(targets)): $(obj)/%.lex.c: $(src)/%.l FORCE +$(obj)/%.lex.c: $(src)/%.l FORCE $(call if_changed,flex) # YACC @@ -199,27 +193,15 @@ $(filter %.lex.c,$(targets)): $(obj)/%.lex.c: $(src)/%.l FORCE quiet_cmd_bison = YACC $@ cmd_bison = $(YACC) -o$@ -t -l $< -ifdef REGENERATE_PARSERS -.PRECIOUS: $(src)/%.tab.c_shipped -$(src)/%.tab.c_shipped: $(src)/%.y - $(call cmd,bison) -endif - .PRECIOUS: $(obj)/%.tab.c -$(filter %.tab.c,$(targets)): $(obj)/%.tab.c: $(src)/%.y FORCE +$(obj)/%.tab.c: $(src)/%.y FORCE $(call if_changed,bison) quiet_cmd_bison_h = YACC $@ cmd_bison_h = bison -o/dev/null --defines=$@ -t -l $< -ifdef REGENERATE_PARSERS -.PRECIOUS: $(src)/%.tab.h_shipped -$(src)/%.tab.h_shipped: $(src)/%.y - $(call cmd,bison_h) -endif - .PRECIOUS: $(obj)/%.tab.h -$(filter %.tab.h,$(targets)): $(obj)/%.tab.h: $(src)/%.y FORCE +$(obj)/%.tab.h: $(src)/%.y FORCE $(call if_changed,bison_h) # Shipped files -- cgit v1.2.3