freebsd-dev/usr.bin/awk/Makefile
Warner Losh a226a9cf8e awk: use awkgram.tab.h consistently
yacc makes awkgram.h. However, one true awk includes awkgram.tab.h, so
we link to for the builds. Make sure that we consistently link to it.
Also, restore the awkgram.tab.h dependency to maketab. It should not
have been deleted, despite apparently making meta build on stable/12
work. The important missing arc was proctab.c's dependence on
awkgram.tab.h.

MFC After:	1 day (build breakage)
Fixes:		c50c8502cb
Sponsored by:	Netflix
2021-07-31 16:24:12 -06:00

37 lines
735 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 awkgram.tab.h
${BTOOLSPATH:U.}/maketab awkgram.tab.h > proctab.c
DEPENDOBJS+= maketab
build-tools: maketab
maketab: awkgram.tab.h ${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>