mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-19 02:29:40 +00:00
666abb0888
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, 214783
Sponsored by: Netflix
(cherry picked from commit f39dd6a978
)
37 lines
727 B
Makefile
37 lines
727 B
Makefile
# $FreeBSD$
|
|
|
|
.include <src.opts.mk>
|
|
|
|
AWKSRC= ${SRCTOP}/contrib/one-true-awk
|
|
.PATH: ${AWKSRC}
|
|
|
|
PROG= awk
|
|
SRCS= awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c awkgram.tab.h
|
|
|
|
CFLAGS+= -DHAS_ISBLANK -I. -I${AWKSRC} -DFOPEN_MAX=64
|
|
|
|
WARNS?= 1
|
|
|
|
LIBADD= m
|
|
|
|
LINKS= ${BINDIR}/awk ${BINDIR}/nawk
|
|
MLINKS= awk.1 nawk.1
|
|
|
|
CLEANFILES= maketab proctab.c awkgram.tab.h
|
|
|
|
awkgram.tab.h: awkgram.h
|
|
ln -sf ${.ALLSRC:M*.h} ${.TARGET}
|
|
|
|
proctab.c: maketab
|
|
${BTOOLSPATH:U.}/maketab awkgram.h > proctab.c
|
|
|
|
DEPENDOBJS+= maketab
|
|
build-tools: maketab
|
|
maketab: awkgram.tab.h maketab.c ${BUILD_TOOLS_META}
|
|
|
|
# awk needs some work before we can connect these tests to the build
|
|
#HAS_TESTS=
|
|
#SUBDIR.${MK_TESTS}+= tests
|
|
|
|
.include <bsd.prog.mk>
|