2024-07-02 01:27:14 +00:00
MB_DOC_HELP_PROJECT ?= ""
MB_DOC_HELP_TARGET ?= ""
MB_DOC_HELP_VARIABLE ?= ""
MB_DOC_HELP_FUNCTION ?= ""
MB_DOC_TXT_BUILD_ALL := "Use 'make help' for possible targets and documention."
MB_DOC_TXT_BUILD_PROJECT := "Welcome to the MSXBUILD help system.\\n\\nFor detailed help use one of the following targets;\\n"
MB_DOC_TXT_BUILD_TARGET := "Build one of the following make targets;\\n"
2024-07-02 14:31:42 +00:00
MB_DOC_TXT_BUILD_VARIABLE := "Documention of the make variables;\\n"
MB_DOC_TXT_BUILD_FUNCTION := "Documention of the make functions;\\n"
2024-07-02 02:11:13 +00:00
MB_DOC_FORMAT ?= txt
MB_DOC_HELP_VARIABLE += $( call mb_doc_variable,MB_DOC_FORMAT," Output format of documention $( MB_CHAR_COMMA) only 'txt' is supported currently. " ,$( MB_DOC_FORMAT) )
2024-07-02 01:27:14 +00:00
d e f i n e _ m b _ d o c _ x m l _ o p e n
$( MB_CHAR_LT ) $( 1) $( if $ ( 2) , $ ( 2) =\"$ ( 3) \") $( MB_CHAR_GT )
e n d e f
d e f i n e _ m b _ d o c _ x m l _ c l o s e
$( MB_CHAR_LT ) / $( 1) $( MB_CHAR_GT )
e n d e f
d e f i n e _ m b _ d o c _ x m l _ t a g _ v a l u e
$( if $ ( 2) ,$ ( call _mb_doc_xml_open ,$ ( 1) ) $ ( MB_CHAR_CDATA_START ) $ ( 2) $ ( MB_CHAR_CDATA_END ) $ ( call _mb_doc_xml_close ,$ ( 1) ) )
e n d e f
d e f i n e _ m b _ d o c _ f u n c t i o n _ t x t
"* " $( 1) $( if $( 3) , $( 3) ) $( if $( 2) ,\\ n\\ t$( 2) \\ n) \\ n
e n d e f
d e f i n e _ m b _ d o c _ f u n c t i o n _ x m l
\\ n\\ t$( call _mb_doc_xml_open,function,name,$( 1) ) \\ n\\ t\\ t$( call _mb_doc_xml_tag_value,args,$( 3) ) \\ n\\ t\\ t$( call _mb_doc_xml_tag_value,desc,$( 2) ) \\ n\\ t$( call _mb_doc_xml_close,function)
e n d e f
d e f i n e m b _ d o c _ f u n c t i o n
$( call _mb_doc_function_$( MB_DOC_FORMAT) ,$( 1) ,$( 2) ,$( 3) )
e n d e f
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_doc_function,"Prints formatted documention of an function." ,"<name> [desc] [args]" )
d e f i n e _ m b _ d o c _ v a r i a b l e _ t x t
"* " $( 1) = $( subst \\ n,\\ \n ,$( 3) ) \\ n$( if $( 2) ,\\ t$( 2) \\ n) \\ n
e n d e f
d e f i n e _ m b _ d o c _ v a r i a b l e _ x m l
\\ n\\ t$( call _mb_doc_xml_open,variable,name,$( 1) ) \\ n\\ t\\ t$( call _mb_doc_xml_tag_value,value,$( 3) ) \\ n\\ t\\ t$( call _mb_doc_xml_tag_value,desc,$( 2) ) \\ n\\ t$( call _mb_doc_xml_close,variable)
e n d e f
d e f i n e m b _ d o c _ v a r i a b l e
$( call _mb_doc_variable_$( MB_DOC_FORMAT) ,$( 1) ,$( 2) ,$( 3) )
e n d e f
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_doc_variable,"Prints formatted documention of an variable." ,"<name> [desc] [value]" )
# "* "$(1)$(if $(2),\\n\\t$(2))$(if $(3),\\n\\t\\tDEPS: $(3))\\n
d e f i n e _ m b _ d o c _ t a r g e t _ t x t
"* " $( 1) $( if $( 2) ,\\ n\\ t$( 2) ) \\ n\\ n
e n d e f
d e f i n e _ m b _ d o c _ t a r g e t _ x m l
\\ n\\ t$( call _mb_doc_xml_open,target,name,$( 1) ) \\ n\\ t\\ t$( call _mb_doc_xml_tag_value,desc,$( 2) ) \\ n\\ t$( call _mb_doc_xml_close,target)
e n d e f
d e f i n e m b _ d o c _ t a r g e t
$( call _mb_doc_target_$( MB_DOC_FORMAT) ,$( 1) ,$( 2) )
e n d e f
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_doc_target,"Prints formatted documention of an target." ,"<name> [desc]" )
d e f i n e _ m b _ d o c _ p r o j e c t _ t x t
"* " $( 1) \\ n
e n d e f
d e f i n e _ m b _ d o c _ p r o j e c t _ x m l
\\ n$( call _mb_doc_xml_open,project) \\ n\\ t$( call _mb_doc_xml_tag_value,name,$( 1) ) \\ n$( call _mb_doc_xml_close,project)
e n d e f
d e f i n e m b _ d o c _ p r o j e c t
$( call _mb_doc_project_$( MB_DOC_FORMAT) ,$( 1) )
e n d e f
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_doc_project,"Prints formatted documention of an project (help)." ,"<name>" )
d e f i n e m b _ d o c _ s h o w _ h e l p @ a l l
@echo $( MB_DOC_TXT_BUILD_ALL)
e n d e f
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_doc_show_help@all,"Displays text for 'make'" )
d e f i n e m b _ d o c _ s h o w _ h e l p @ p r o j e c t
@echo $( MB_DOC_TXT_BUILD_PROJECT)
@echo $( MB_DOC_HELP_PROJECT)
e n d e f
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_doc_show_help@project,"Displays text for 'make help'" )
d e f i n e m b _ d o c _ s h o w _ h e l p @ t a r g e t
$( if $( filter txt,$( MB_DOC_FORMAT) ) ,@echo $( MB_DOC_TXT_BUILD_TARGET) )
$( if $( filter xml,$( MB_DOC_FORMAT) ) ,@echo $( call _mb_doc_xml_open,firemake) )
@echo $( MB_DOC_HELP_TARGET)
$( if $( filter xml,$( MB_DOC_FORMAT) ) ,@echo $( call _mb_doc_xml_close,firemake) )
e n d e f
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_doc_show_help@target,"Displays text for 'make help@target'" )
d e f i n e m b _ d o c _ s h o w _ h e l p @ v a r i a b l e
$( if $( filter txt,$( MB_DOC_FORMAT) ) ,@echo $( MB_DOC_TXT_BUILD_VARIABLE) )
$( if $( filter xml,$( MB_DOC_FORMAT) ) ,@echo $( call _mb_doc_xml_open,firemake) )
@echo $( MB_DOC_HELP_VARIABLE)
$( if $( filter xml,$( MB_DOC_FORMAT) ) ,@echo $( call _mb_doc_xml_close,firemake) )
e n d e f
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_doc_show_help@variable,"Displays text for 'make help@variable'" )
d e f i n e m b _ d o c _ s h o w _ h e l p @ f u n c t i o n
$( if $( filter txt,$( MB_DOC_FORMAT) ) ,@echo $( MB_DOC_TXT_BUILD_FUNCTION) )
$( if $( filter xml,$( MB_DOC_FORMAT) ) ,@echo $( call _mb_doc_xml_open,firemake) )
@echo $( MB_DOC_HELP_FUNCTION)
$( if $( filter xml,$( MB_DOC_FORMAT) ) ,@echo $( call _mb_doc_xml_close,firemake) )
e n d e f
MB_DOC_HELP_FUNCTION += $( call mb_doc_function,mb_doc_show_help@function,"Displays text for 'make help@function'" )