Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
48
include/debug.mk
Normal file
48
include/debug.mk
Normal file
@@ -0,0 +1,48 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
#
|
||||
# Copyright (C) 2007-2020 OpenWrt.org
|
||||
|
||||
# debug flags:
|
||||
#
|
||||
# d: show subdirectory tree
|
||||
# t: show added targets
|
||||
# l: show legacy targets
|
||||
# r: show autorebuild messages
|
||||
# v: verbose (no .SILENCE for common targets)
|
||||
|
||||
ifeq ($(DUMP),)
|
||||
ifeq ($(DEBUG),all)
|
||||
build_debug:=dltvr
|
||||
else
|
||||
build_debug:=$(DEBUG)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(DEBUG),)
|
||||
|
||||
define debug
|
||||
$$(findstring $(2),$$(if $$(DEBUG_SCOPE_DIR),$$(if $$(filter $$(DEBUG_SCOPE_DIR)%,$(1)),$(build_debug)),$(build_debug)))
|
||||
endef
|
||||
|
||||
define warn
|
||||
$$(if $(call debug,$(1),$(2)),$$(warning $(3)))
|
||||
endef
|
||||
|
||||
define debug_eval
|
||||
$$(if $(call debug,$(1),$(2)),$(3))
|
||||
endef
|
||||
|
||||
define warn_eval
|
||||
$(call warn,$(1),$(2),$(3) $(4))
|
||||
$(4)
|
||||
endef
|
||||
|
||||
else
|
||||
|
||||
debug:=
|
||||
warn:=
|
||||
debug_eval:=
|
||||
warn_eval = $(4)
|
||||
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user