msxbuild/lib/make/𓃬𓍄𓋹𓀭/mb_flow_help.mk
Willem Cazander dabe1e1403
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 8s
Silenced tmp file cleanup of build in MSXBUILD help system integration.
2024-07-19 17:59:54 +02:00

159 lines
10 KiB
Makefile
Raw Permalink 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.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

MB_FLOW_HELP_TEMP := $(shell mktemp)
$(call mb-make-call,mb-doc-variable-rock,MB_FLOW_HELP_TEMP,Temp file to output help with.)
MB_FLOW_HELP_UNITEEN_XML ?= on
$(call mb-make-call,mb-doc-variable-rock,MB_FLOW_HELP_UNITEEN_XML,Test dutch unit-one flag XML attributes.)
# Never use echo to display real text: Argument List Too Long
define _mb-flow-print-help
$(MB_   )@echo -e "$(2)"
$(MB_   )$(file >$(MB_FLOW_HELP_TEMP),$($(1)))
$(MB_   )@cat $(MB_FLOW_HELP_TEMP)
$(MB_   )@$(call mb-make-call,mb-os-file-delete,$(MB_FLOW_HELP_TEMP))
endef
define _mb-flow-help-uniteen-xml
$(MB_   )$(call mb-make-call,mb-make-space-newline)$\
$(MB_      )$(call mb-make-call,mb-make-space-tab)$(call mb-make-call,mb-make-xml-open,uniteen,flag,orange,للَّٰهِilLצسُو,ₚᵣₐᵧTo)$(call mb-make-call,mb-make-space-newline)$\
$(MB_      )$(call mb-make-call,mb-make-space-tab)$(call mb-make-call,mb-make-xml-close,uniteen)$(call mb-make-call,mb-make-space-newline)$\
$(MB_      )$(call mb-make-call,mb-make-space-tab)$(call mb-make-call,mb-make-xml-open,uniteen,flag,red,𑀳𑁂𑀮𑀺𑀉𑁄𑀤𑁄𑀭𑁂𑀡𑀪𑀸𑀕,ₚᵣₐᵧTo)$(call mb-make-call,mb-make-space-newline)$\
$(MB_      )$(call mb-make-call,mb-make-space-tab)$(call mb-make-call,mb-make-xml-close,uniteen)$(call mb-make-call,mb-make-space-newline)$\
$(MB_      )$(call mb-make-call,mb-make-space-tab)$(call mb-make-call,mb-make-xml-open,uniteen,flag,white,ᒡᒢᑊᒻᒻᓫᔿ,ₚᵣₐᵧTo)$(call mb-make-call,mb-make-space-newline)$\
$(MB_      )$(call mb-make-call,mb-make-space-tab)$(call mb-make-call,mb-make-xml-close,uniteen)$(call mb-make-call,mb-make-space-newline)$\
$(MB_      )$(call mb-make-call,mb-make-space-tab)$(call mb-make-call,mb-make-xml-open,uniteen,flag,blue,仙上主天,ₚᵣₐᵧTo)$(call mb-make-call,mb-make-space-newline)$\
$(MB_      )$(call mb-make-call,mb-make-space-tab)$(call mb-make-call,mb-make-xml-close,uniteen)$(call mb-make-call,mb-make-space-newline)
endef
define __mb-flow-doc-help
.RECIPEPREFIX := $(MB_@RECIPE)
@help:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_TARGET_HELP,Welcome to the $$(if $$(MB_PROJ_META_NAME),$$(MB_PROJ_META_NAME),MSXBUILD) help system.\\n\\nFor detailed fire help use one of the following targets;)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help)
@help-variable:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_VARIABLE,Documention of the make fire variables;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-variable,Lists build variables.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-variable)
@help-variable-deep:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_VARIABLE_DEEP,Documention of the deep make variables;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-variable-deep,Lists deep variables.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-variable-deep)
@help-variable-rock:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_VARIABLE_ROCK,Documention of the rock make variables;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-variable-rock,Lists rock variables.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-variable-rock)
@help-variable-flow:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_VARIABLE_FLOW,Documention of the flow make variables;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-variable-flow,Lists flow variables.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-variable-flow)
@help-variable-i18n:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_VARIABLE_I18N,Documention of the i18n make variables;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-variable-i18n,Lists i18n variables.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-variable-i18n)
@help-function:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_FUNCTION,Documention of the make fire functions;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-function,Lists build functions.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-function)
@help-function-deep:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_FUNCTION_DEEP,Documention of the deep make functions;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-function-deep,Lists deep functions.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-function-deep)
@help-function-flow:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_FUNCTION_FLOW,Documention of the flow make functions;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-function-flow,Lists flow functions.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-function-flow)
@help-target:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_TARGET,Build one of the following make fire targets;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-target,Lists build targets.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-target)
@help-target-deep:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_TARGET_DEEP,Build one of the following deep make targets;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-target-deep,Lists deep targets.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-target-deep)
@help-target-run:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_TARGET_RUN,Build one of the following run make targets;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-target-run,Lists runnable targets.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-target-run)
@help-target-module:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_TARGET_MODULE,Build one of the following module make targets;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-target-module,Lists module targets.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-target-module)
@help-target-orphan:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_TARGET_ORPHAN,Build one of the following orphan make targets;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-target-orphan,Lists orphan targets.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-target-orphan)
@help-target-assert:
$(MB_@RECIPE)$$(call mb-make-call,_mb-flow-print-help,MB_DOC_FIRE_TARGET_ASSERT,Build one of the following assert make targets;)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-target-assert,Lists assert targets.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-target-assert)
@help-machine:
$(MB_@RECIPE)@echo -e "Use one of the following machines to build targets;"
$(MB_@RECIPE)@echo -e "\n "$(foreach _rom,$(MB_MSXROM_FIRE_MACHINES)," * $(_rom)\n")
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-machine,Lists supported machines.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-machine)
@help-all: \
$(MB_   )@help-variable @help-variable-deep @help-variable-rock @help-variable-flow @help-variable-i18n \
$(MB_   )@help-function @help-function-deep @help-function-flow \
$(MB_   )@help-target @help-target-deep @help-target-run @help-target-module @help-target-orphan @help-target-assert \
$(MB_   )@help-machine
$(MB_@RECIPE)$$(call mb-make-call,mb-os-echo-good,OK)
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-all,Lists all documented information.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-all)
@help-firemake:
$(MB_@RECIPE)$$(eval MB_DOC_FORMAT :$(MB_MAKE_EQUALS) xml)
$(MB_@RECIPE)$$(file >$(MB_FLOW_HELP_TEMP),$$(call mb-make-call,mb-make-xml-prolog))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(call mb-make-call,mb-make-xml-open,$$(MB_DOC_XML_ROOT)))
$(MB_@RECIPE)$$(if $$(filter on,$$(MB_FLOW_HELP_UNITEEN_XML)),$$(file >>$(MB_FLOW_HELP_TEMP),$$(call mb-make-call,_mb-flow-help-uniteen-xml)))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_VARIABLE))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_VARIABLE_DEEP))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_VARIABLE_ROCK))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_VARIABLE_FLOW))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_VARIABLE_I18N))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_FUNCTION))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_FUNCTION_DEEP))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_FUNCTION_FLOW))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_TARGET))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_TARGET_DEEP))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_TARGET_RUN))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_TARGET_MODULE))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_TARGET_ORPHAN))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_TARGET_ASSERT))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(MB_DOC_FIRE_TARGET_HELP))
$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(call mb-make-call,mb-make-xml-close,$$(MB_DOC_XML_ROOT)))
$(MB_@RECIPE)@cat $$(MB_FLOW_HELP_TEMP)
$(MB_@RECIPE)@$$(call mb-make-call,mb-os-file-delete,$$(MB_FLOW_HELP_TEMP))
$(MB_   )$$(call mb-make-call,mb-doc-target-help,@help-firemake,Output all documention in XML for IDE integration.)
$(MB_   )$$(call mb-make-call,mb-make-target-phony,@help-firemake)
# TODO: create doc for "warpue" xml tag + list Word vAriable Readout Private valUE (for UI)
#$(MB_@RECIPE)$$(file >>$(MB_FLOW_HELP_TEMP),$$(foreach _rom,$$(MB_MSXROM_FIRE_MACHINES),\t$$(call mb-make-call,mb-make-xml-open,$$(MB_DOC_XML_TAG_MACHINE),name,$$(_rom))$$(call mb-make-call,mb-make-xml-close,$$(MB_DOC_XML_TAG_MACHINE))\n))
.RECIPEPREFIX := $(MB_@RECIPEPREFIX)
endef
define mb-flow-doc-help
$(MB_   )$(eval $(call mb-make-call,__$(0),$(1)))
endef
$(call mb-make-call,mb-doc-function-flow,mb-flow-doc-help,Inject flow of fire help system.)