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