summaryrefslogtreecommitdiffstats
path: root/usr.bin/awk/Makefile
blob: 1d3642b6a8323d57b9a2ccc086d3122c02a7c10a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# $FreeBSD$

AWKSRC=	${.CURDIR}/../../contrib/one-true-awk
.PATH: ${AWKSRC}

PROG=	nawk
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}/nawk ${BINDIR}/awk
MLINKS=	nawk.1 awk.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

CLEANFILES+=	nawk.1
nawk.1: awk.1
	cat ${.ALLSRC} > ${.TARGET}

.include <bsd.prog.mk>
OpenPOWER on IntegriCloud