2001-10-30 08:56:50 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
2018-01-11 05:36:13 +00:00
|
|
|
.include <src.opts.mk>
|
|
|
|
|
2017-02-11 20:27:06 +00:00
|
|
|
AWKSRC= ${SRCTOP}/contrib/one-true-awk
|
2001-10-30 08:56:50 +00:00
|
|
|
.PATH: ${AWKSRC}
|
|
|
|
|
2008-02-28 16:41:51 +00:00
|
|
|
PROG= awk
|
2002-04-09 07:03:32 +00:00
|
|
|
SRCS= awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c ytab.h
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2008-03-27 01:33:26 +00:00
|
|
|
CFLAGS+= -DHAS_ISBLANK -I. -I${AWKSRC} -DFOPEN_MAX=64
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2010-01-02 10:27:05 +00:00
|
|
|
WARNS?= 1
|
|
|
|
|
2014-11-25 14:29:10 +00:00
|
|
|
LIBADD= m
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2008-02-28 16:41:51 +00:00
|
|
|
LINKS= ${BINDIR}/awk ${BINDIR}/nawk
|
|
|
|
MLINKS= awk.1 nawk.1
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2002-04-09 07:05:24 +00:00
|
|
|
CLEANFILES= maketab proctab.c ytab.h
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2016-06-14 16:20:05 +00:00
|
|
|
# XXX: awkgram.c isn't really needed here but it is added to keep
|
|
|
|
# awkgram.h: .NOMETA respected.
|
|
|
|
ytab.h: awkgram.c awkgram.h .NOMETA
|
|
|
|
ln -sf ${.ALLSRC:M*.h} ${.TARGET}
|
2001-10-30 08:56:50 +00:00
|
|
|
|
|
|
|
proctab.c: maketab
|
2019-06-02 16:44:50 +00:00
|
|
|
${BTOOLSPATH:U.}/maketab awkgram.h > proctab.c
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2019-06-15 17:08:13 +00:00
|
|
|
DEPENDOBJS+= maketab
|
2001-10-30 08:56:50 +00:00
|
|
|
build-tools: maketab
|
2017-02-11 20:27:06 +00:00
|
|
|
maketab: ytab.h maketab.c ${BUILD_TOOLS_META}
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2018-01-11 05:36:13 +00:00
|
|
|
# awk needs some work before we can connect these tests to the build
|
|
|
|
#HAS_TESTS=
|
2018-01-29 14:15:44 +00:00
|
|
|
#SUBDIR.${MK_TESTS}+= tests
|
2018-01-11 05:36:13 +00:00
|
|
|
|
2001-10-30 08:56:50 +00:00
|
|
|
.include <bsd.prog.mk>
|