msxbuild/lib/make/mb_make_call.mk
Willem Cazander a16516d934
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -6s
WIP Tab removal, new debug mode, clean proj deps + add i18n commands.
2024-07-10 14:05:38 +02:00

26 lines
806 B
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

MB_MAKE_CALL_DEBUG ?= off
# Workaround for --warn-undefined-variables
1 :=
2 :=
3 :=
4 :=
5 :=
6 :=
7 :=
8 :=
9 :=
define _mb_make_call_debug
$(MB__    )$(if $(filter off,$(MB_MAKE_CALL_DEBUG)),,$(if $(findstring mb_doc_,$(1)),,$(warning DEBUG $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9))))
endef
define mb_make_call
$(MB__    )$(call _mb_make_call_debug,$(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),$(9))$(if $(filter file,$(origin $(1))),$(call $(1),$(2),$(3),$(4),$(5),$(6),$(7),$(8),$(9)),$(error $(1) is not defined))
endef
$(call mb_make_call,mb_doc_function_deep,mb_make_call,"Checked origin call function wrapper.","<function> [args...]")
# Wait until function is parsed...
$(call mb_make_call,mb_doc_variable_deep,MB_MAKE_CALL_DEBUG,"If on prints debug trace of all make calls.")