From 64b522da271d4e076aa89ba5151a67d00ec7b92f Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Tue, 31 Mar 2020 15:59:29 +0000 Subject: [PATCH] Include ${.CURDIR}/local.init.mk if it exists This is handy for making local hacks to an app (eg to build it as tool for non-BSD host) without making a mess of the code base. Reviewed by: bdrewery MFC after: 1 week Differential Revision: https://reviews.freebsd.org//D24101 --- share/mk/local.init.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/share/mk/local.init.mk b/share/mk/local.init.mk index f0206021e511..29a951a6aac0 100644 --- a/share/mk/local.init.mk +++ b/share/mk/local.init.mk @@ -1,5 +1,8 @@ # $FreeBSD$ +.if !target(__${_this}__) +__${_this}__: + .if ${.MAKE.MODE:Mmeta*} != "" .if !empty(SUBDIR) && !defined(LIB) && !defined(PROG) && ${.MAKE.MAKEFILES:M*bsd.prog.mk} == "" .if ${.MAKE.MODE:Mleaf*} != "" @@ -33,3 +36,5 @@ CFLAGS+= ${HOST_CFLAGS} .endif .-include "src.init.mk" +.-include "${.CURDIR}/local.init.mk" +.endif