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