world: Lower WARNS for bmake/tcsh contrib.
[dragonfly.git] / usr.bin / bmake / Makefile
CommitLineData
1957ada4
JM
1# $NetBSD: Makefile,v 1.56 2012/05/30 21:54:23 sjg Exp $
2# @(#)Makefile 5.2 (Berkeley) 12/28/90
3# $Id: Makefile.in,v 1.174 2012/10/10 18:46:24 sjg Exp $
4
5PROG= make
6SRCS= arch.c buf.c compat.c cond.c dir.c for.c hash.c job.c main.c \
7 make.c parse.c str.c suff.c targ.c trace.c var.c util.c
8SRCS+= strlist.c
9SRCS+= make_malloc.c
10SRCS+= lstAppend.c lstAtEnd.c lstAtFront.c lstClose.c lstConcat.c \
11 lstDatum.c lstDeQueue.c lstDestroy.c lstDupl.c lstEnQueue.c \
12 lstFind.c lstFindFrom.c lstFirst.c lstForEach.c lstForEachFrom.c \
13 lstInit.c lstInsert.c lstIsAtEnd.c lstIsEmpty.c lstLast.c \
14 lstMember.c lstNext.c lstOpen.c lstRemove.c lstReplace.c lstSucc.c
15SRCS += lstPrev.c
16
17SRCS+= stresep.c
c211e079 18SRCS+= meta.c metachar.c
1957ada4
JM
19
20# you can use this Makefile if you have an earlier version of bmake.
21srcdir= ${.CURDIR}/../../contrib/bmake
22
23# Base version on src date
c211e079 24MAKE_VERSION= 20160818
2b01fcf9
JM
25.if defined(BOOTSTRAPPING)
26DEFAULT_SYS_PATH = ${.CURDIR}/../../share/mk
27.else
3db89b52 28DEFAULT_SYS_PATH = /usr/share/mk:.../share/mk
2b01fcf9 29.endif
1957ada4 30
a4cce472
JM
31# move vital dports information to bmake for performance reasons
32DFLYVERSION!= awk '/^\#define[[:blank:]]__DragonFly_version/ {print $$3}' \
33 < ${.CURDIR}/../../sys/sys/param.h
34OSREL!= echo ${DFLYVERSION} | \
35 awk '{a=int($$1/100000); b=int(($$1-(a*100000))/100); \
36 print a "." b}'
37
1957ada4
JM
38CPPFLAGS+= -DUSE_EMALLOC
39CPPFLAGS+= -DUSE_META
40CPPFLAGS+= -DMAKE_NATIVE
41CFLAGS+= ${CPPFLAGS}
42CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\"
43CFLAGS+= -I${.CURDIR}
44CFLAGS+= -I${.OBJDIR}
45CFLAGS+= -I${srcdir}
46CFLAGS+= -DHAVE_CONFIG_H
673bdc16 47CFLAGS+= -DCCVER=\"${CCVER}\"
a4cce472 48CFLAGS+= -DDFVER=\"${DFLYVERSION}\" -DOSREL=\"${OSREL}\"
63e3a85f 49CFLAGS+= -DNO_PWD_OVERRIDE
1957ada4
JM
50CFLAGS+= ${XDEFS}
51CFLAGS+= ${CFLAGS_${.TARGET:T}}
52CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T}}
53COPTS.main.c= "-DMAKE_VERSION=\"${MAKE_VERSION}\""
54COPTS.var.c= -Wno-cast-qual
55COPTS.job.c= -Wno-format-nonliteral
56COPTS.parse.c= -Wno-format-nonliteral
57COPTS.var.c= -Wno-format-nonliteral
58
f51dcbd4 59# XXX pending bmake update
60.if !defined(WARNS_AUDIT)
61WARNS= 1
62.endif
63
5e81654c 64DPADD= ${LIBUTIL}
1957ada4
JM
65LDADD= -lutil
66
67.PATH: ${srcdir}
68.PATH: ${srcdir}/lst.lib
69
70MAN= make.1
71make.1: bmake.1
f4b3f8d4
FF
72 @sed -e '/^.Nm/s/bmake/${PROG}/' -e 's/Xr make 1/Nm bmake/' \
73 -e 's/ $$//' -e 's/^make$$/.Nm/' -e 's/ NetBSD$$/\'$$'\n.Nx/' \
74 -e '/^NetBSD .\..$$/s/NetBSD/.Nx/' \
1957ada4
JM
75 < ${.ALLSRC} > ${.TARGET}
76
77CLEANFILES+= make.1
78
79.include <bsd.prog.mk>