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