Use our auto-YACC'ing rules to do most of the work.

Submitted by:	bde
This commit is contained in:
David E. O'Brien 2002-03-23 04:49:43 +00:00
parent f1bb97a884
commit 2fe5bfd7a1

View File

@ -4,7 +4,7 @@ AWKSRC= ${.CURDIR}/../../contrib/one-true-awk
.PATH: ${AWKSRC}
PROG= nawk
SRCS= b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c ytab.c ytab.h
SRCS= awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c
CFLAGS+= -I. -I${AWKSRC}
@ -18,12 +18,8 @@ MLINKS+= nawk.1 awk.1
CLEANFILES+= maketab proctab.c ytab.c ytab.h
.ORDER: ytab.c ytab.h proctab.c
ytab.c ytab.h: ${AWKSRC}/awkgram.y
@echo Expect 42 reduce/shift conflicts and 83 reduce/reduce conflicts
${YACC} -d ${AWKSRC}/awkgram.y
mv -f y.tab.c ytab.c
mv -f y.tab.h ytab.h
ytab.h: awkgram.h
ln -sf ${.ALLSRC} ${.TARGET}
proctab.c: maketab
./maketab > proctab.c