Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 
0003 hostprogs-always-y      += genksyms
0004 
0005 genksyms-objs   := genksyms.o parse.tab.o lex.lex.o
0006 
0007 # FIXME: fix the ambiguous grammar in parse.y and delete this hack
0008 #
0009 # Suppress shift/reduce, reduce/reduce conflicts warnings
0010 # unless W=1 is specified.
0011 #
0012 # Just in case, run "$(YACC) --version" without suppressing stderr
0013 # so that 'bison: not found' will be displayed if it is missing.
0014 ifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),)
0015 
0016 quiet_cmd_bison_no_warn = $(quiet_cmd_bison)
0017       cmd_bison_no_warn = $(YACC) --version >/dev/null; \
0018                           $(cmd_bison) 2>/dev/null
0019 
0020 $(obj)/pars%.tab.c $(obj)/pars%.tab.h: $(src)/pars%.y FORCE
0021         $(call if_changed,bison_no_warn)
0022 
0023 endif
0024 
0025 # -I needed for generated C source to include headers in source tree
0026 HOSTCFLAGS_parse.tab.o := -I $(srctree)/$(src)
0027 HOSTCFLAGS_lex.lex.o := -I $(srctree)/$(src)
0028 
0029 # dependencies on generated files need to be listed explicitly
0030 $(obj)/lex.lex.o: $(obj)/parse.tab.h