platforms we install as "nawk". At the moment Gawk is borked on sparc64, however BWK AWK works fine.
44 lines
885 B
Makefile
44 lines
885 B
Makefile
# $FreeBSD$
|
|
|
|
AWKSRC= ${.CURDIR}/../../contrib/one-true-awk
|
|
.PATH: ${AWKSRC}
|
|
|
|
.if ${MACHINE_ARCH} == "sparc64"
|
|
PROG= awk
|
|
.else
|
|
PROG= nawk
|
|
.endif
|
|
SRCS= b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c ytab.c ytab.h
|
|
MAN1= ${PROG}.1
|
|
|
|
# Important for ctype macros!
|
|
CFLAGS+= -funsigned-char
|
|
CFLAGS+= -I. -I${AWKSRC}
|
|
|
|
DPADD+= ${LIBM}
|
|
LDADD+= -lm
|
|
|
|
#LINKS+= ${BINDIR}/awk ${BINDIR}/nawk
|
|
#MLINKS+= awk.1 nawk.1
|
|
|
|
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
|
|
|
|
nawk.1: awk.1
|
|
ln -sf ${.ALLSRC} ${.TARGET}
|
|
|
|
.include <bsd.prog.mk>
|