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
|
one-true-awk: import 20210221 (1e4bc42c53a1) which fixes a number of bugs
Import the latest bsd-features branch of the one-true-awk upstream:
o Move to bison for $YACC
o Set close-on-exec flag for file and pipe redirects that aren't std*
o lots of little fixes to modernize ocde base
o free sval member before setting it
o fix a bug where a{0,3} could match aaaa
o pull in systime and strftime from NetBSD awk
o pull in fixes from {Net,Free,Open}BSD (normalized our code with them)
o add BSD extensions and, or, xor, compl, lsheift, rshift (mostly a nop)
Also revert a few of the trivial FreeBSD changes that were done slightly
differently in the upstreaming process. Also, our PR database may have
been mined by upstream for these fixes, and Mikolaj Golub may deserve
credit for some of the fixes in this update.
Suggested by: Mikolaj Golub <to.my.trociny@gmail.com>
PR: 143363,143365,143368,143369,143373,143375,214782
Sponsored by: Netflix
2021-07-07 23:30:35 +00:00
|
|
|
SRCS= awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c awkgram.tab.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
|
|
|
|
one-true-awk: import 20210221 (1e4bc42c53a1) which fixes a number of bugs
Import the latest bsd-features branch of the one-true-awk upstream:
o Move to bison for $YACC
o Set close-on-exec flag for file and pipe redirects that aren't std*
o lots of little fixes to modernize ocde base
o free sval member before setting it
o fix a bug where a{0,3} could match aaaa
o pull in systime and strftime from NetBSD awk
o pull in fixes from {Net,Free,Open}BSD (normalized our code with them)
o add BSD extensions and, or, xor, compl, lsheift, rshift (mostly a nop)
Also revert a few of the trivial FreeBSD changes that were done slightly
differently in the upstreaming process. Also, our PR database may have
been mined by upstream for these fixes, and Mikolaj Golub may deserve
credit for some of the fixes in this update.
Suggested by: Mikolaj Golub <to.my.trociny@gmail.com>
PR: 143363,143365,143368,143369,143373,143375,214782
Sponsored by: Netflix
2021-07-07 23:30:35 +00:00
|
|
|
CLEANFILES= maketab proctab.c awkgram.tab.h
|
2001-10-30 08:56:50 +00:00
|
|
|
|
one-true-awk: import 20210221 (1e4bc42c53a1) which fixes a number of bugs
Import the latest bsd-features branch of the one-true-awk upstream:
o Move to bison for $YACC
o Set close-on-exec flag for file and pipe redirects that aren't std*
o lots of little fixes to modernize ocde base
o free sval member before setting it
o fix a bug where a{0,3} could match aaaa
o pull in systime and strftime from NetBSD awk
o pull in fixes from {Net,Free,Open}BSD (normalized our code with them)
o add BSD extensions and, or, xor, compl, lsheift, rshift (mostly a nop)
Also revert a few of the trivial FreeBSD changes that were done slightly
differently in the upstreaming process. Also, our PR database may have
been mined by upstream for these fixes, and Mikolaj Golub may deserve
credit for some of the fixes in this update.
Suggested by: Mikolaj Golub <to.my.trociny@gmail.com>
PR: 143363,143365,143368,143369,143373,143375,214782
Sponsored by: Netflix
2021-07-07 23:30:35 +00:00
|
|
|
awkgram.tab.h: awkgram.h
|
2016-06-14 16:20:05 +00:00
|
|
|
ln -sf ${.ALLSRC:M*.h} ${.TARGET}
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2021-07-31 22:17:44 +00:00
|
|
|
proctab.c: maketab awkgram.tab.h
|
|
|
|
${BTOOLSPATH:U.}/maketab awkgram.tab.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
|
2021-07-31 22:17:44 +00:00
|
|
|
maketab: awkgram.tab.h ${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>
|