1# $FreeBSD$ 2 3AWKSRC= ${.CURDIR}/../../contrib/one-true-awk 4.PATH: ${AWKSRC} 5 6PROG= awk 7SRCS= b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c ytab.c ytab.h 8MAN1= awk.1 9 10# Important for ctype macros! 11CFLAGS+= -funsigned-char 12CFLAGS+= -I. -I${AWKSRC} 13 14DPADD+= ${LIBM} 15LDADD+= -lm 16 17LINKS+= ${BINDIR}/awk ${BINDIR}/nawk 18MLINKS+= awk.1 nawk.1 19 20CLEANFILES+= maketab proctab.c ytab.c ytab.h 21 22.ORDER: ytab.c ytab.h proctab.c 23ytab.c ytab.h: ${AWKSRC}/awkgram.y 24 @echo Expect 42 reduce/shift conflicts and 83 reduce/reduce conflicts 25 ${YACC} -d ${AWKSRC}/awkgram.y 26 mv -f y.tab.c ytab.c 27 mv -f y.tab.h ytab.h 28 29proctab.c: maketab 30 ./maketab > proctab.c 31 32build-tools: maketab 33maketab: ytab.h ${AWKSRC}/maketab.c 34 ${CC} ${CFLAGS} ${AWKSRC}/maketab.c -o maketab 35 36.include <bsd.prog.mk> 37