1 # $NetBSD: Makefile,v 1.14 2024/09/20 07:49:31 rin Exp $ 2 3 WARNS?= 4 4 CWARNFLAGS.clang+= -Wno-self-assign 5 6 .include <bsd.own.mk> 7 8 BINDIR?= /usr/bin 9 DIST= ${.CURDIR}/../dist 10 .PATH: ${DIST} 11 12 PROG= awk 13 SRCS= awkgram.y b.c lex.c lib.c main.c parse.c proctab.c run.c tran.c 14 CPPFLAGS+= -I${DIST} -I. -DHAS_ISBLANK 15 LDADD+= -lm 16 .if !defined(HOSTPROG) 17 DPADD+= ${LIBM} 18 .endif 19 YHEADER= yes 20 CWARNFLAGS+= -Wno-pointer-sign 21 COPTS.run.c+= -Wno-format-nonliteral 22 COPTS.tran.c+= -Wno-format-nonliteral 23 24 # info file originally from GNU awk 3.1.3, adjusted for nawk slightly 25 .PATH: ${NETBSDSRCDIR}/external/gpl2/gawk/dist 26 TEXINFO= awk.info 27 28 # During the tools build (from src/tools/awk/Makefile), 29 # src/tools/Makefile.host changes .CURDIR back and forth between 30 # src/tools/awk and src/usr.bin/awk. For some unknown reason, including 31 # bsd.info.mk here leads to the obj dir being created at the wrong time, 32 # while .CURDIR is src/usr.bin/awk. Work around the problem by not 33 # including bsd.info.mk when MKINFO=no. 34 .if ${MKINFO} != "no" 35 .include <bsd.info.mk> 36 .endif 37 38 .include <bsd.prog.mk> 39