62f261e751
need to primarily install as a non-conflicting name.
35 lines
668 B
Makefile
35 lines
668 B
Makefile
# $FreeBSD$
|
|
|
|
AWKSRC= ${.CURDIR}/../../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 ytab.h
|
|
|
|
CFLAGS+= -DHAS_ISBLANK -I. -I${AWKSRC}
|
|
|
|
DPADD= ${LIBM}
|
|
LDADD= -lm
|
|
|
|
LINKS= ${BINDIR}/awk ${BINDIR}/nawk
|
|
MLINKS= awk.1 nawk.1
|
|
|
|
CLEANFILES= maketab proctab.c ytab.h
|
|
|
|
ytab.h: awkgram.h
|
|
ln -sf ${.ALLSRC} ${.TARGET}
|
|
|
|
proctab.c: maketab
|
|
./maketab > proctab.c
|
|
|
|
build-tools: maketab
|
|
maketab: ytab.h ${AWKSRC}/maketab.c
|
|
|
|
.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
|
|
|
|
.include <bsd.prog.mk>
|