1# This is a generated file, do NOT edit! 2# See contrib/bmake/bsd.after-import.mk 3# 4# $FreeBSD$ 5 6SRCTOP?= ${.CURDIR:H:H} 7 8# look here first for config.h 9CFLAGS+= -I${.CURDIR} 10 11# for after-import 12CLEANDIRS+= FreeBSD 13CLEANFILES+= bootstrap 14 15# $Id: Makefile,v 1.112 2020/08/28 16:26:17 sjg Exp $ 16 17PROG?= ${.CURDIR:T} 18 19SRCS= \ 20 arch.c \ 21 buf.c \ 22 compat.c \ 23 cond.c \ 24 dir.c \ 25 enum.c \ 26 for.c \ 27 hash.c \ 28 job.c \ 29 lst.c \ 30 main.c \ 31 make.c \ 32 make_malloc.c \ 33 meta.c \ 34 metachar.c \ 35 parse.c \ 36 str.c \ 37 strlist.c \ 38 suff.c \ 39 targ.c \ 40 trace.c \ 41 util.c \ 42 var.c 43 44.sinclude "Makefile.inc" 45 46# this file gets generated by configure 47.sinclude "Makefile.config" 48 49.if !empty(LIBOBJS) 50SRCS+= ${LIBOBJS:T:.o=.c} 51.endif 52 53# just in case 54prefix?= /usr 55srcdir?= ${.CURDIR} 56 57DEFAULT_SYS_PATH?= ${prefix}/share/mk 58 59CPPFLAGS+= -DUSE_META 60CFLAGS+= ${CPPFLAGS} 61CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" 62CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE 63CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} 64COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" 65 66# meta mode can be useful even without filemon 67# should be set by now 68USE_FILEMON ?= no 69.if ${USE_FILEMON:tl} != "no" 70.PATH: ${srcdir}/filemon 71SRCS+= filemon_${USE_FILEMON}.c 72COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} 73COPTS.job.c+= ${COPTS.meta.c} 74 75.if ${USE_FILEMON} == "dev" 76FILEMON_H ?= /usr/include/dev/filemon/filemon.h 77.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" 78COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} 79.endif 80.endif # USE_FILEMON == dev 81 82.endif # USE_FILEMON 83 84.PATH: ${srcdir} 85 86.if make(obj) || make(clean) 87SUBDIR+= unit-tests 88.endif 89 90 91MAN= ${PROG}.1 92MAN1= ${MAN} 93 94.if (${PROG} != "make") 95CLEANFILES+= my.history 96.if make(${MAN}) || !exists(${srcdir}/${MAN}) 97my.history: 98 @(echo ".Nm"; \ 99 echo "is derived from NetBSD"; \ 100 echo ".Xr make 1 ."; \ 101 echo "It uses autoconf to facilitate portability to other platforms."; \ 102 echo ".Pp") > $@ 103 104.NOPATH: ${MAN} 105${MAN}: make.1 my.history 106 @echo making $@ 107 @sed \ 108 -e '/^.Dt/s/MAKE/${PROG:tu}/' \ 109 -e 's/^.Nx/NetBSD/' \ 110 -e '/^.Nm/s/make/${PROG}/' \ 111 -e '/^.Sh HISTORY/rmy.history' \ 112 -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ 113 114all beforeinstall: ${MAN} 115_mfromdir=. 116.endif 117.endif 118 119MANTARGET?= cat 120MANDEST?= ${MANDIR}/${MANTARGET}1 121 122.if ${MANTARGET} == "cat" 123_mfromdir=${srcdir} 124.endif 125 126.include <bsd.prog.mk> 127 128CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H 129COPTS.var.c += -Wno-cast-qual 130COPTS.job.c += -Wno-format-nonliteral 131COPTS.parse.c += -Wno-format-nonliteral 132COPTS.var.c += -Wno-format-nonliteral 133 134# Force these 135SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} 136BINDIR= ${BINDIR.bmake:U${prefix}/bin} 137MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} 138 139.if !exists(.depend) 140${OBJS}: config.h 141.endif 142 143 144# A simple unit-test driver to help catch regressions 145TEST_MAKE ?= ${.OBJDIR}/${PROG:T} 146accept test: 147 cd ${.CURDIR}/unit-tests && \ 148 MAKEFLAGS= ${TEST_MAKE} -r -m / ${.TARGET} ${TESTS:DTESTS=${TESTS:Q}} 149 150 151# override some simple things 152BINDIR= /usr/bin 153MANDIR= /usr/share/man/man 154 155# make sure we get this 156CFLAGS+= ${COPTS.${.IMPSRC:T}} 157 158after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk 159 cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk 160 161