1.include <src.opts.mk> 2 3AWKSRC= ${SRCTOP}/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 awkgram.tab.h 8 9CFLAGS+= -DHAS_ISBLANK -I. -I${AWKSRC} -DFOPEN_MAX=64 10 11WARNS?= 1 12 13LIBADD= m 14 15LINKS= ${BINDIR}/awk ${BINDIR}/nawk 16MLINKS= awk.1 nawk.1 17 18CLEANFILES= maketab proctab.c awkgram.tab.h 19 20awkgram.tab.h: awkgram.h 21 ln -sf ${.ALLSRC:M*.h} ${.TARGET} 22 23proctab.c: awkgram.tab.h 24 ${BTOOLSPATH:U.}/maketab awkgram.tab.h > proctab.c 25 26.if ${MACHINE} == "host" || ${MK_DIRDEPS_BUILD} == "no" 27DEPENDOBJS+= maketab 28build-tools: maketab 29proctab.c: maketab 30maketab: awkgram.tab.h ${BUILD_TOOLS_META} 31.endif 32 33HAS_TESTS= 34SUBDIR.${MK_TESTS}+= tests 35 36.include <bsd.prog.mk> 37