Revert changes with new dnscrypto-proxy.
[tomato.git] / toolchain / include / debug.mk
blob68d70ba093357f799a87ccc3a5121c80f8fa462c
1 #
2 # Copyright (C) 2007 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 # debug flags:
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)
16 ifeq ($(DUMP),)
17 ifeq ($(DEBUG),all)
18 build_debug:=dltvr
19 else
20 build_debug:=$(DEBUG)
21 endif
22 endif
24 define debug
25 $$(findstring $(2),$$(if $$(DEBUG_DIR),$$(if $$(filter $$(DEBUG_DIR)%,$(1)),$(build_debug)),$(build_debug)))
26 endef
28 define warn
29 $$(if $(call debug,$(1),$(2)),$$(warning $(3)))
30 endef
32 define debug_eval
33 $$(if $(call debug,$(1),$(2)),$(3))
34 endef
36 define warn_eval
37 $(call warn,$(1),$(2),$(3) $(4))
38 $(4)
39 endef