From 8023ec242f1442159ba68d793447b9b3dc8db0aa Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Mon, 14 Mar 2016 16:22:34 -0400 Subject: Automatically generate parser.h. * Makefile.am: Set AM_YFLAGS to -d to generate parser.h. Add parser.h to CLEANFILES and include parser.h as a dependency of lexxer.c. * lexxer.l: Declare yyerror here. * parser.h: Remove file since yacc will generate the same content automatically. --- Makefile.am | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 3e6dfcf..65737be 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,9 +3,11 @@ libexec_PROGRAMS = migcom bin_SCRIPTS = mig +AM_YFLAGS = -d + EXTRA_DIST = gensym.awk cpu.sym -CLEANFILES = cpu.h *.sym[co] lexxer.c parser.c +CLEANFILES = cpu.h *.sym[co] lexxer.c parser.c parser.h AWK_V = $(AWK_V_$(V)) AWK_V_ = $(AWK_V_$(AM_DEFAULT_VERBOSITY)) @@ -29,6 +31,8 @@ SUFFIXES = .h .symo .symc .sym $< > $@ cpu.symc: $(srcdir)/gensym.awk +lexxer.c: parser.h + $(migcom_OBJECTS): cpu.h # -- cgit v1.2.3