2001-10-30 08:56:50 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
AWKSRC= ${.CURDIR}/../../contrib/one-true-awk
|
|
|
|
.PATH: ${AWKSRC}
|
|
|
|
|
2002-03-05 19:37:12 +00:00
|
|
|
PROG= nawk
|
2001-10-30 08:56:50 +00:00
|
|
|
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}
|
|
|
|
|
2002-03-06 18:37:26 +00:00
|
|
|
DPADD= ${LIBM}
|
|
|
|
LDADD= -lm
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2002-03-06 18:06:39 +00:00
|
|
|
.if ${MACHINE_ARCH} == "sparc64"
|
|
|
|
LINKS+= ${BINDIR}/nawk ${BINDIR}/awk
|
|
|
|
MLINKS+= nawk.1 awk.1
|
|
|
|
.endif
|
2001-10-30 08:56:50 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2002-03-06 18:37:26 +00:00
|
|
|
CLEANFILES+= nawk.1
|
2002-03-05 19:37:12 +00:00
|
|
|
nawk.1: awk.1
|
|
|
|
ln -sf ${.ALLSRC} ${.TARGET}
|
|
|
|
|
2001-10-30 08:56:50 +00:00
|
|
|
.include <bsd.prog.mk>
|