1# $Id: sys.debug.mk,v 1.4 2025/08/09 22:42:24 sjg Exp $ 2# 3# @(#) Copyright (c) 2009, Simon J. Gerraty 4# 5# SPDX-License-Identifier: BSD-2-Clause 6# 7# Please send copies of changes and bug-fixes to: 8# sjg@crufty.net 9# 10 11# Sometimes we want to turn on debugging in just one or two places 12# if .CURDIR is matched by any entry in DEBUG_MAKE_SYS_DIRS we 13# will apply DEBUG_MAKE_FLAGS now. 14# if an entry in DEBUG_MAKE_DIRS matches, we at the end of sys.mk 15# eg. DEBUG_MAKE_FLAGS=-dv DEBUG_MAKE_SYS_DIRS="*lib/sjg" 16# use DEBUG_MAKE_FLAGS0 to apply only to .MAKE.LEVEL 0 17# 18.if ${.MAKE.LEVEL:U1} == 0 19# we use indirection, to simplify the tests below, and incase 20# DEBUG_* were given on our command line. 21_DEBUG_MAKE_FLAGS = ${DEBUG_MAKE_FLAGS0} 22_DEBUG_MAKE_SYS_DIRS = ${DEBUG_MAKE_SYS_DIRS0:U${DEBUG_MAKE_SYS_DIRS}} 23_DEBUG_MAKE_DIRS = ${DEBUG_MAKE_DIRS0:U${DEBUG_MAKE_DIRS}} 24.else 25_DEBUG_MAKE_FLAGS = ${DEBUG_MAKE_FLAGS} 26_DEBUG_MAKE_SYS_DIRS = ${DEBUG_MAKE_SYS_DIRS} 27_DEBUG_MAKE_DIRS = ${DEBUG_MAKE_DIRS} 28.endif 29