1 |
# $Id: sys.debug.mk,v 1.1 2016/10/01 19:11:55 sjg Exp $ |
2 |
# |
3 |
# @(#) Copyright (c) 2009, Simon J. Gerraty |
4 |
# |
5 |
# This file is provided in the hope that it will |
6 |
# be of use. There is absolutely NO WARRANTY. |
7 |
# Permission to copy, redistribute or otherwise |
8 |
# use this file is hereby granted provided that |
9 |
# the above copyright notice and this notice are |
10 |
# left intact. |
11 |
# |
12 |
# Please send copies of changes and bug-fixes to: |
13 |
# sjg@crufty.net |
14 |
# |
15 |
|
16 |
# Sometimes we want to turn on debugging in just one or two places |
17 |
# if .CURDIR is matched by any entry in DEBUG_MAKE_SYS_DIRS we |
18 |
# will apply DEBUG_MAKE_FLAGS now. |
19 |
# if an entry in DEBUG_MAKE_DIRS matches, we at the end of sys.mk |
20 |
# eg. DEBUG_MAKE_FLAGS=-dv DEBUG_MAKE_SYS_DIRS="*lib/sjg" |
21 |
# use DEBUG_MAKE_FLAGS0 to apply only to .MAKE.LEVEL 0 |
22 |
# |
23 |
.if ${.MAKE.LEVEL:U1} == 0 |
24 |
# we use indirection, to simplify the tests below, and incase |
25 |
# DEBUG_* were given on our command line. |
26 |
_DEBUG_MAKE_FLAGS = ${DEBUG_MAKE_FLAGS0} |
27 |
_DEBUG_MAKE_SYS_DIRS = ${DEBUG_MAKE_SYS_DIRS0:U${DEBUG_MAKE_SYS_DIRS}} |
28 |
_DEBUG_MAKE_DIRS = ${DEBUG_MAKE_DIRS0:U${DEBUG_MAKE_DIRS}} |
29 |
.else |
30 |
_DEBUG_MAKE_FLAGS = ${DEBUG_MAKE_FLAGS} |
31 |
_DEBUG_MAKE_SYS_DIRS = ${DEBUG_MAKE_SYS_DIRS} |
32 |
_DEBUG_MAKE_DIRS = ${DEBUG_MAKE_DIRS} |
33 |
.endif |