1# $FreeBSD$ 2 3AWKSRC= ${.CURDIR}/../../contrib/one-true-awk 4.PATH: ${AWKSRC} 5 6PROG= awk 7SRCS= awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c ytab.h 8 9CFLAGS+= -DHAS_ISBLANK -I. -I${AWKSRC} -DFOPEN_MAX=64 10 11DPADD= ${LIBM} 12LDADD= -lm 13 14LINKS= ${BINDIR}/awk ${BINDIR}/nawk 15MLINKS= awk.1 nawk.1 16 17CLEANFILES= maketab proctab.c ytab.h 18 19ytab.h: awkgram.h 20 ln -sf ${.ALLSRC} ${.TARGET} 21 22proctab.c: maketab 23 ./maketab > proctab.c 24 25build-tools: maketab 26maketab: ytab.h ${AWKSRC}/maketab.c 27 28.for f in b.c main.c run.c 29${f}: ${AWKSRC}/${f} ${.CURDIR}/${f}.diff 30 patch -s -b .orig -o ${.TARGET} < ${.CURDIR}/${f}.diff ${AWKSRC}/${f} 31CLEANFILES+= ${f} 32.endfor 33 34.include <bsd.prog.mk> 35