1# $FreeBSD$ 2 3# The include file <bsd.init.mk> includes <bsd.opts.mk>, 4# ../Makefile.inc and <bsd.own.mk>; this is used at the 5# top of all <bsd.*.mk> files that actually "build something". 6# bsd.opts.mk is included early so Makefile.inc can use the 7# MK_FOO variables. 8 9.if !target(__<bsd.init.mk>__) 10__<bsd.init.mk>__: 11.include <bsd.opts.mk> 12.-include "local.init.mk" 13.if exists(${.CURDIR}/../Makefile.inc) 14.include "${.CURDIR}/../Makefile.inc" 15.endif 16.include <bsd.own.mk> 17.MAIN: all 18 19.if ${.MAKE.LEVEL:U1} == 0 && ${BUILD_AT_LEVEL0:Uyes:tl} == "no" && !make(clean*) 20# this tells lib.mk and prog.mk to not actually build anything 21_SKIP_BUILD = not building at level 0 22.endif 23.if ${.MAKE.LEVEL} > 0 && !empty(_SKIP_BUILD) 24.warning ${_SKIP_BUILD} 25.endif 26 27beforebuild: .PHONY .NOTMAIN 28.if !defined(_SKIP_BUILD) 29all: beforebuild .WAIT 30.endif 31 32.if ${MK_META_MODE} == "yes" 33.if !exists(/dev/filemon) && \ 34 ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !defined(NO_FILEMON) && \ 35 !make(showconfig) && !make(print-dir) && ${.MAKEFLAGS:M-V} == "" 36.warning The filemon module (/dev/filemon) is not loaded. 37.warning META_MODE is less useful for incremental builds without filemon. 38.warning 'kldload filemon' or pass -DNO_FILEMON to suppress this warning. 39.endif 40.endif # ${MK_META_MODE} == "yes" 41 42.endif # !target(__<bsd.init.mk>__) 43