2024-07-05 18:43:18 +00:00
|
|
|
|
|
|
|
|
|
MB_MAKE_COMMA := ,
|
2024-07-07 18:53:06 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_COMMA,"Expanded special char; comma.")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
|
|
|
|
MB_MAKE_SPACE := $(subst ,, )
|
2024-07-07 18:53:06 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_SPACE,"Expanded special char; space.")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
|
|
|
|
MB_MAKE_EQUALS := =
|
2024-07-07 18:53:06 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_EQUALS,"Expanded special char; equals.")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
2024-07-10 12:05:38 +00:00
|
|
|
|
MB_MAKE_HASH := \#
|
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_HASH,"Expanded special char; hash.")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
2024-07-10 12:05:38 +00:00
|
|
|
|
MB_MAKE_COLON := :
|
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_COLON,"Expanded special char; colon.")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
2024-07-10 12:05:38 +00:00
|
|
|
|
MB_MAKE_DOLLAR := $$
|
|
|
|
|
$(call mb_make_call,mb_doc_variable_rock,MB_MAKE_DOLLAR,"Expanded special char; dollar.")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-10 12:05:38 +00:00
|
|
|
|
define mb_make_flag_phony
|
|
|
|
|
.PHONY: $(1)
|
|
|
|
|
endef
|
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_flag_phony,"Marks an target as phony.","<target>")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-10 12:05:38 +00:00
|
|
|
|
define mb_make_newline
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
2024-07-10 12:05:38 +00:00
|
|
|
|
endef
|
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_newline,"Prints a newline character.")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-10 12:05:38 +00:00
|
|
|
|
define mb_make_space2comma
|
|
|
|
|
$(MB__ )$(subst $(MB_MAKE_SPACE),$(MB_MAKE_COMMA),$1)
|
|
|
|
|
endef
|
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_space2comma,"Replaces all spaces witth comma's.")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define mb_make_rwildcard
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(MB__ )$(foreach d,$(wildcard $1*),$(call mb_make_rwildcard,$d/,$2) $(filter $(subst *,%,$2),$d))
|
2024-07-05 18:43:18 +00:00
|
|
|
|
endef
|
2024-07-07 18:53:06 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_rwildcard,"Recursive wildcard search.","<dir> <match>")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
define mb_make_lowercase
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(MB__ )$(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$(1)))))))))))))))))))))))))))
|
2024-07-05 18:43:18 +00:00
|
|
|
|
endef
|
2024-07-07 18:53:06 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_lowercase,"Converts ascii string to lowercase.","<string>")
|
2024-07-05 18:43:18 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-07 02:33:03 +00:00
|
|
|
|
define mb_make_uppercase
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(MB__ )$(subst a,A,$(subst b,B,$(subst c,C,$(subst d,D,$(subst e,E,$(subst f,F,$(subst g,G,$(subst h,H,$(subst i,I,$(subst j,J,$(subst k,K,$(subst l,L,$(subst m,M,$(subst n,N,$(subst o,O,$(subst p,P,$(subst q,Q,$(subst r,R,$(subst s,S,$(subst t,T,$(subst u,U,$(subst v,V,$(subst w,W,$(subst x,X,$(subst y,Y,$(subst z,Z,$(1)))))))))))))))))))))))))))
|
2024-07-07 02:33:03 +00:00
|
|
|
|
endef
|
2024-07-07 18:53:06 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_uppercase,"Converts ascii string to uppercase.","<string>")
|
2024-07-07 02:33:03 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-07 21:26:47 +00:00
|
|
|
|
define __mb_make_flow_0module
|
2024-07-07 02:33:03 +00:00
|
|
|
|
include $$(call mb_make_call,mb_make_rwildcard,$(1),*/0module.mk)
|
|
|
|
|
endef
|
2024-07-07 21:26:47 +00:00
|
|
|
|
define mb_make_flow_0module
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(MB__ )$(call mb_make_call,mb_make_check_arg1,mb_make_flow_0module,$(1))
|
|
|
|
|
$(MB__ )$(eval $(call mb_make_call,__mb_make_flow_0module,$(1)))
|
2024-07-07 21:26:47 +00:00
|
|
|
|
endef
|
2024-07-07 18:53:06 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_flow,mb_make_flow_0module,"Prints flow of recursive 0module.mk include.","<dir>")
|
2024-07-07 02:33:03 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-10 12:05:38 +00:00
|
|
|
|
define mb_make_check_variable
|
|
|
|
|
$(MB__ )$(if $($(1)),,$(error $(1): Is empty))
|
2024-07-07 21:45:25 +00:00
|
|
|
|
endef
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_check_variable,"Checks that a variable is not empty.","<variable>")
|
2024-07-07 21:45:25 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-10 12:05:38 +00:00
|
|
|
|
define mb_make_check_arg1
|
|
|
|
|
$(MB__ )$(if $(2),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG1)))
|
|
|
|
|
endef
|
2024-07-08 02:23:37 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_check_arg1,"Checks that a function has a given argument.","<function> <arg1>")
|
2024-07-10 12:05:38 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-08 02:23:37 +00:00
|
|
|
|
define mb_make_check_arg2
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(MB__ )$(if $(2),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG1))) \
|
|
|
|
|
$(MB__ )$(if $(3),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG2)))
|
2024-07-07 21:45:25 +00:00
|
|
|
|
endef
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_check_arg2,"Checks that a function has the given arguments.","<function> <arg1>")
|
2024-07-07 21:45:25 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-08 02:23:37 +00:00
|
|
|
|
define mb_make_check_arg3
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(MB__ )$(if $(2),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG1))) \
|
|
|
|
|
$(MB__ )$(if $(3),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG2))) \
|
|
|
|
|
$(MB__ )$(if $(4),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG3)))
|
2024-07-07 21:45:25 +00:00
|
|
|
|
endef
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_check_arg3,"Checks that a function has the given arguments.","<function> <arg1>")
|
2024-07-07 21:45:25 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-08 02:23:37 +00:00
|
|
|
|
define mb_make_check_arg4
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(MB__ )$(if $(2),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG1))) \
|
|
|
|
|
$(MB__ )$(if $(3),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG2))) \
|
|
|
|
|
$(MB__ )$(if $(4),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG3))) \
|
|
|
|
|
$(MB__ )$(if $(5),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG4)))
|
2024-07-07 21:45:25 +00:00
|
|
|
|
endef
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_check_arg4,"Checks that a function has the given arguments.","<function> <arg1>")
|
2024-07-07 21:45:25 +00:00
|
|
|
|
|
|
|
|
|
|
2024-07-08 02:23:37 +00:00
|
|
|
|
define mb_make_check_arg5
|
2024-07-10 12:05:38 +00:00
|
|
|
|
$(MB__ )$(if $(2),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG1))) \
|
|
|
|
|
$(MB__ )$(if $(3),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG2))) \
|
|
|
|
|
$(MB__ )$(if $(4),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG3))) \
|
|
|
|
|
$(MB__ )$(if $(5),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG4))) \
|
|
|
|
|
$(MB__ )$(if $(6),,$(error $(1): $(MB_I18N_MAKE_CHECK_ARG5)))
|
2024-07-07 21:45:25 +00:00
|
|
|
|
endef
|
2024-07-08 02:23:37 +00:00
|
|
|
|
$(call mb_make_call,mb_doc_function_deep,mb_make_check_arg5,"Checks that a function has the given arguments.","<function> <arg1>")
|
2024-07-07 03:38:57 +00:00
|
|
|
|
|