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