1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-30 12:04:07 +00:00
freebsd/usr.bin/awk/Makefile
David E. O'Brien a370851f6e To quote BDE: "the k part of awk should understand the ctype macros and not
need the -funsigned-char hack."

Also add needed CLEANSFILE.
2002-03-06 18:37:26 +00:00

40 lines
814 B
Makefile

# $FreeBSD$
AWKSRC= ${.CURDIR}/../../contrib/one-true-awk
.PATH: ${AWKSRC}
PROG= nawk
SRCS= b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c ytab.c ytab.h
CFLAGS+= -I. -I${AWKSRC}
DPADD= ${LIBM}
LDADD= -lm
.if ${MACHINE_ARCH} == "sparc64"
LINKS+= ${BINDIR}/nawk ${BINDIR}/awk
MLINKS+= nawk.1 awk.1
.endif
CLEANFILES+= maketab proctab.c ytab.c ytab.h
.ORDER: ytab.c ytab.h proctab.c
ytab.c ytab.h: ${AWKSRC}/awkgram.y
@echo Expect 42 reduce/shift conflicts and 83 reduce/reduce conflicts
${YACC} -d ${AWKSRC}/awkgram.y
mv -f y.tab.c ytab.c
mv -f y.tab.h ytab.h
proctab.c: maketab
./maketab > proctab.c
build-tools: maketab
maketab: ytab.h ${AWKSRC}/maketab.c
${CC} ${CFLAGS} ${AWKSRC}/maketab.c -o maketab
CLEANFILES+= nawk.1
nawk.1: awk.1
ln -sf ${.ALLSRC} ${.TARGET}
.include <bsd.prog.mk>