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
|
2002-04-09 07:03:32 +00:00
|
|
|
SRCS= awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c ytab.h
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2003-03-17 08:07:54 +00:00
|
|
|
CFLAGS+= -DHAS_ISBLANK -I. -I${AWKSRC}
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2002-03-06 18:37:26 +00:00
|
|
|
DPADD= ${LIBM}
|
|
|
|
LDADD= -lm
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2002-04-09 07:05:24 +00:00
|
|
|
LINKS= ${BINDIR}/nawk ${BINDIR}/awk
|
|
|
|
MLINKS= nawk.1 awk.1
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2002-04-09 07:05:24 +00:00
|
|
|
CLEANFILES= maketab proctab.c ytab.h
|
2001-10-30 08:56:50 +00:00
|
|
|
|
2002-04-09 07:05:24 +00:00
|
|
|
ytab.h: awkgram.h
|
2002-04-10 03:10:03 +00:00
|
|
|
ln -sf ${.ALLSRC} ${.TARGET}
|
2001-10-30 08:56:50 +00:00
|
|
|
|
|
|
|
proctab.c: maketab
|
|
|
|
./maketab > proctab.c
|
|
|
|
|
|
|
|
build-tools: maketab
|
|
|
|
maketab: ytab.h ${AWKSRC}/maketab.c
|
|
|
|
|
2002-04-10 03:10:03 +00:00
|
|
|
CLEANFILES+= nawk.1
|
2002-03-05 19:37:12 +00:00
|
|
|
nawk.1: awk.1
|
2003-06-06 13:46:55 +00:00
|
|
|
cat ${.ALLSRC} > ${.TARGET}
|
2002-03-05 19:37:12 +00:00
|
|
|
|
2005-05-17 14:54:33 +00:00
|
|
|
.for f in b.c main.c run.c
|
|
|
|
${f}: ${AWKSRC}/${f} ${.CURDIR}/${f}.diff
|
|
|
|
patch -s -b .orig -o ${.TARGET} < ${.CURDIR}/${f}.diff ${AWKSRC}/${f}
|
|
|
|
CLEANFILES+= ${f}
|
|
|
|
.endfor
|
|
|
|
|
2001-10-30 08:56:50 +00:00
|
|
|
.include <bsd.prog.mk>
|