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.107 2020/06/07 21:18:46 sjg Exp $ 16 17PROG?= ${.CURDIR:T} 18 19SRCS= \ 20 arch.c \ 21 buf.c \ 22 compat.c \ 23 cond.c \ 24 dir.c \ 25 for.c \ 26 hash.c \ 27 job.c \ 28 main.c \ 29 make.c \ 30 make_malloc.c \ 31 meta.c \ 32 metachar.c \ 33 parse.c \ 34 str.c \ 35 strlist.c \ 36 suff.c \ 37 targ.c \ 38 trace.c \ 39 util.c \ 40 var.c 41 42# from lst.lib/ 43SRCS+= \ 44 lstAppend.c \ 45 lstAtEnd.c \ 46 lstAtFront.c \ 47 lstClose.c \ 48 lstConcat.c \ 49 lstDatum.c \ 50 lstDeQueue.c \ 51 lstDestroy.c \ 52 lstDupl.c \ 53 lstEnQueue.c \ 54 lstFind.c \ 55 lstFindFrom.c \ 56 lstFirst.c \ 57 lstForEach.c \ 58 lstForEachFrom.c \ 59 lstInit.c \ 60 lstInsert.c \ 61 lstIsAtEnd.c \ 62 lstIsEmpty.c \ 63 lstLast.c \ 64 lstMember.c \ 65 lstNext.c \ 66 lstOpen.c \ 67 lstPrev.c \ 68 lstRemove.c \ 69 lstReplace.c \ 70 lstSucc.c 71 72.sinclude "Makefile.inc" 73 74# this file gets generated by configure 75.sinclude "Makefile.config" 76 77.if !empty(LIBOBJS) 78SRCS+= ${LIBOBJS:T:.o=.c} 79.endif 80 81# just in case 82prefix?= /usr 83srcdir?= ${.CURDIR} 84 85DEFAULT_SYS_PATH?= ${prefix}/share/mk 86 87CPPFLAGS+= -DUSE_META 88CFLAGS+= ${CPPFLAGS} 89CFLAGS+= -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\" 90CFLAGS+= -I. -I${srcdir} ${XDEFS} -DMAKE_NATIVE 91CFLAGS+= ${COPTS.${.ALLSRC:M*.c:T:u}} 92COPTS.main.c+= "-DMAKE_VERSION=\"${_MAKE_VERSION}\"" 93 94# meta mode can be useful even without filemon 95# should be set by now 96USE_FILEMON ?= no 97.if ${USE_FILEMON:tl} != "no" 98.PATH: ${srcdir}/filemon 99SRCS+= filemon_${USE_FILEMON}.c 100COPTS.meta.c+= -DUSE_FILEMON -DUSE_FILEMON_${USE_FILEMON:tu} 101COPTS.job.c+= ${COPTS.meta.c} 102 103.if ${USE_FILEMON} == "dev" 104FILEMON_H ?= /usr/include/dev/filemon/filemon.h 105.if exists(${FILEMON_H}) && ${FILEMON_H:T} == "filemon.h" 106COPTS.filemon_dev.c += -DHAVE_FILEMON_H -I${FILEMON_H:H} 107.endif 108.endif # USE_FILEMON == dev 109 110.endif # USE_FILEMON 111 112.PATH: ${srcdir} 113.PATH: ${srcdir}/lst.lib 114 115.if make(obj) || make(clean) 116SUBDIR+= unit-tests 117.endif 118 119 120MAN= ${PROG}.1 121MAN1= ${MAN} 122 123.if (${PROG} != "make") 124CLEANFILES+= my.history 125.if make(${MAN}) || !exists(${srcdir}/${MAN}) 126my.history: 127 @(echo ".Nm"; \ 128 echo "is derived from NetBSD"; \ 129 echo ".Xr make 1 ."; \ 130 echo "It uses autoconf to facilitate portability to other platforms."; \ 131 echo ".Pp") > $@ 132 133.NOPATH: ${MAN} 134${MAN}: make.1 my.history 135 @echo making $@ 136 @sed \ 137 -e '/^.Dt/s/MAKE/${PROG:tu}/' \ 138 -e 's/^.Nx/NetBSD/' \ 139 -e '/^.Nm/s/make/${PROG}/' \ 140 -e '/^.Sh HISTORY/rmy.history' \ 141 -e '/^.Sh HISTORY/,$$s,^.Nm,make,' ${srcdir}/make.1 > $@ 142 143all beforeinstall: ${MAN} 144_mfromdir=. 145.endif 146.endif 147 148MANTARGET?= cat 149MANDEST?= ${MANDIR}/${MANTARGET}1 150 151.if ${MANTARGET} == "cat" 152_mfromdir=${srcdir} 153.endif 154 155.include <bsd.prog.mk> 156 157CPPFLAGS+= -DMAKE_NATIVE -DHAVE_CONFIG_H 158COPTS.var.c += -Wno-cast-qual 159COPTS.job.c += -Wno-format-nonliteral 160COPTS.parse.c += -Wno-format-nonliteral 161COPTS.var.c += -Wno-format-nonliteral 162 163# Force these 164SHAREDIR= ${SHAREDIR.bmake:U${prefix}/share} 165BINDIR= ${BINDIR.bmake:U${prefix}/bin} 166MANDIR= ${MANDIR.bmake:U${SHAREDIR}/man} 167 168.if !exists(.depend) 169${OBJS}: config.h 170.endif 171 172 173# A simple unit-test driver to help catch regressions 174accept test: 175 cd ${.CURDIR}/unit-tests && MAKEFLAGS= ${.MAKE} -r -m / TEST_MAKE=${TEST_MAKE:U${.OBJDIR}/${PROG:T}} ${.TARGET} 176 177# override some simple things 178BINDIR= /usr/bin 179MANDIR= /usr/share/man/man 180 181# make sure we get this 182CFLAGS+= ${COPTS.${.IMPSRC:T}} 183 184after-import: ${SRCTOP}/contrib/bmake/bsd.after-import.mk 185 cd ${.CURDIR} && ${.MAKE} -f ${SRCTOP}/contrib/bmake/bsd.after-import.mk 186 187