1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 21da177e4SLinus Torvalds 31da177e4SLinus Torvaldshostprogs-y := genksyms 41da177e4SLinus Torvaldsalways := $(hostprogs-y) 51da177e4SLinus Torvalds 6880f4499SArnaud Lacombegenksyms-objs := genksyms.o parse.tab.o lex.lex.o 71da177e4SLinus Torvalds 8833e6224SMasahiro Yamada# FIXME: fix the ambiguous grammar in parse.y and delete this hack 9833e6224SMasahiro Yamada# 10833e6224SMasahiro Yamada# Suppress shift/reduce, reduce/reduce conflicts warnings 11833e6224SMasahiro Yamada# unless W=1 is specified. 12833e6224SMasahiro Yamada# 13833e6224SMasahiro Yamada# Just in case, run "$(YACC) --version" without suppressing stderr 14833e6224SMasahiro Yamada# so that 'bison: not found' will be displayed if it is missing. 15*e27128dbSMasahiro Yamadaifeq ($(findstring 1,$(KBUILD_EXTRA_WARN)),) 16833e6224SMasahiro Yamada 170da7e432SMauro Rossiquiet_cmd_bison_no_warn = $(quiet_cmd_bison) 18833e6224SMasahiro Yamada cmd_bison_no_warn = $(YACC) --version >/dev/null; \ 19833e6224SMasahiro Yamada $(cmd_bison) 2>/dev/null 20833e6224SMasahiro Yamada 216ba7dc66SMasahiro Yamada$(obj)/pars%.tab.c $(obj)/pars%.tab.h: $(src)/pars%.y FORCE 22833e6224SMasahiro Yamada $(call if_changed,bison_no_warn) 23833e6224SMasahiro Yamada 24833e6224SMasahiro Yamadaendif 25833e6224SMasahiro Yamada 261da177e4SLinus Torvalds# -I needed for generated C source (shipped source) 279cc342f6SMasahiro YamadaHOSTCFLAGS_parse.tab.o := -I $(srctree)/$(src) 289cc342f6SMasahiro YamadaHOSTCFLAGS_lex.lex.o := -I $(srctree)/$(src) 291da177e4SLinus Torvalds 301da177e4SLinus Torvalds# dependencies on generated files need to be listed explicitly 31bb3290d9SLinus Torvalds$(obj)/lex.lex.o: $(obj)/parse.tab.h 32