[kernel/3+] add missing DM/MD config symbols
[openwrt.git] / include / debug.mk
1 #
2 # Copyright (C) 2007 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 # debug flags:
9 #
10 # d: show subdirectory tree
11 # t: show added targets
12 # l: show legacy targets
13 # r: show autorebuild messages
14 # v: verbose (no .SILENCE for common targets)
15
16 ifeq ($(DUMP),)
17 ifeq ($(DEBUG),all)
18 build_debug:=dltvr
19 else
20 build_debug:=$(DEBUG)
21 endif
22 endif
23
24 ifneq ($(DEBUG),)
25
26 define debug
27 $$(findstring $(2),$$(if $$(DEBUG_SCOPE_DIR),$$(if $$(filter $$(DEBUG_SCOPE_DIR)%,$(1)),$(build_debug)),$(build_debug)))
28 endef
29
30 define warn
31 $$(if $(call debug,$(1),$(2)),$$(warning $(3)))
32 endef
33
34 define debug_eval
35 $$(if $(call debug,$(1),$(2)),$(3))
36 endef
37
38 define warn_eval
39 $(call warn,$(1),$(2),$(3) $(4))
40 $(4)
41 endef
42
43 else
44
45 debug:=
46 warn:=
47 debug_eval:=
48 warn_eval = $(4)
49
50 endif
51
This page took 0.043965 seconds and 5 git commands to generate.