On Fri, Jul 07, 2006 at 04:54:34PM -0700, H. Peter Anvin wrote:I propose the following as a global yacc rule; already used in usr/dash in the klibc tree, and which seems to work for both bison and BSD yacc:klibc and the kernel does not share any rules today.
quiet_cmd_yacc = YACC $@
cmd_yacc = $(YACC) -d -o $@ $<
$(obj)/%.c %(obj)/%.h: $(src)/%.y
$(call cmd,yacc)
And yacc is so special that it's not worth it only for yacc to start
doing this.
In todays kernel build yacc is never used. For the few cases were output
of yacc is needed the kernel include _shipped files. For dash we should
maybe consider the same?