Moved phase deps to function registration.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -3s

This commit is contained in:
Willem Cazander 2024-07-08 00:34:15 +02:00
parent 5f26a4588d
commit 73d566d16d
10 changed files with 63 additions and 14 deletions

View file

@ -4,7 +4,7 @@ $(1)/@assert-$(2): $(1)/@build
grep -q -U $(4) $(1)/$(3) grep -q -U $(4) $(1)/$(3)
$$(call mb_make_call,mb_make_echo_assert,Assert succesfully @assert-$(2)) $$(call mb_make_call,mb_make_echo_assert,Assert succesfully @assert-$(2))
$$(call mb_make_call,mb_doc_target,$(1)/@assert-$(2),"Asserts that $(3) output matches.") $$(call mb_make_call,mb_doc_target,$(1)/@assert-$(2),"Asserts that $(3) output matches.")
MB_PROJ_PHASE_TEST_DEPS += $(1)/@assert-$(2) $$(call mb_make_call,mb_proj_grow_deps_phase_test,$(1)/@assert-$(2))
.PHONY: $(1)/@assert-$(2) .PHONY: $(1)/@assert-$(2)
endef endef
define mb_assert_flow_grep_binary define mb_assert_flow_grep_binary
@ -22,7 +22,7 @@ $(1)-test-$(2)/@assert: $(1)/@build
grep -q $(4) $(1)-test-$(2)/$(3).out grep -q $(4) $(1)-test-$(2)/$(3).out
$$(call mb_make_call,mb_make_echo_assert,Assert succesfully $(1)-test-$(2)/@assert) $$(call mb_make_call,mb_make_echo_assert,Assert succesfully $(1)-test-$(2)/@assert)
$$(call mb_make_call,mb_doc_target,$(1)-test-$(2)/@assert,"Asserts that $(3) output matches.") $$(call mb_make_call,mb_doc_target,$(1)-test-$(2)/@assert,"Asserts that $(3) output matches.")
MB_PROJ_PHASE_TEST_DEPS += $(1)-test-$(2)/@assert $$(call mb_make_call,mb_proj_grow_deps_phase_test,$(1)-test-$(2)/@assert)
.PHONY: $(1)-test-$(2)/@assert .PHONY: $(1)-test-$(2)/@assert
endef endef
define mb_assert_flow_bdos_grep define mb_assert_flow_bdos_grep

View file

@ -19,6 +19,7 @@ $(call mb_make_call,mb_doc_variable,MB_FLIGHT_VIDEO_NAME,"Video file name of the
define mb_flight_video_merge define mb_flight_video_merge
$(call mb_make_call,mb_make_check_args_1,mb_flight_video_merge,$(1))
$(call mb_make_call,mb_make_echo_good,Indexing flight videos) $(call mb_make_call,mb_make_echo_good,Indexing flight videos)
ls -1tr $(1)/*-omsx/videos/*.avi | awk -F "$(1)/" -v s="file '" -v e="'" '{print s$$2e}' > $(1)/$(MB_FLIGHT_VIDEO_NAME).lst ls -1tr $(1)/*-omsx/videos/*.avi | awk -F "$(1)/" -v s="file '" -v e="'" '{print s$$2e}' > $(1)/$(MB_FLIGHT_VIDEO_NAME).lst
ffmpeg -v quiet -y -f concat -i $(1)/$(MB_FLIGHT_VIDEO_NAME).lst -c copy $(1)/$(MB_FLIGHT_VIDEO_NAME).avi ffmpeg -v quiet -y -f concat -i $(1)/$(MB_FLIGHT_VIDEO_NAME).lst -c copy $(1)/$(MB_FLIGHT_VIDEO_NAME).avi
@ -64,7 +65,7 @@ $$(call mb_make_call,mb_doc_target_help,@flight-video-package-qa,"Runs @clean an
.PHONY: @flight-video-package-qa .PHONY: @flight-video-package-qa
endef endef
define mb_flight_proj_flow_video define mb_flight_proj_flow_video
$(if $(1),,$(error $(1) missing)) $(call mb_make_call,mb_make_check_args_1,mb_flight_proj_flow_video,$(1))
$(eval $(call mb_make_call,__mb_flight_proj_flow_video,$(1))) $(eval $(call mb_make_call,__mb_flight_proj_flow_video,$(1)))
endef endef
$(call mb_make_call,mb_doc_function_flow,mb_flight_proj_flow_video,"Prints flow for adding flight video targets in project build cycle.","<path-bin>") $(call mb_make_call,mb_doc_function_flow,mb_flight_proj_flow_video,"Prints flow for adding flight video targets in project build cycle.","<path-bin>")

View file

@ -94,7 +94,7 @@ define __mb_make_flow_0module
include $$(call mb_make_call,mb_make_rwildcard,$(1),*/0module.mk) include $$(call mb_make_call,mb_make_rwildcard,$(1),*/0module.mk)
endef endef
define mb_make_flow_0module define mb_make_flow_0module
$(if $(1),,$(error $(1) missing)) $(call mb_make_call,mb_make_check_args_1,mb_make_flow_0module,$(1))
$(eval $(call mb_make_call,__mb_make_flow_0module,$(1))) $(eval $(call mb_make_call,__mb_make_flow_0module,$(1)))
endef endef
$(call mb_make_call,mb_doc_function_flow,mb_make_flow_0module,"Prints flow of recursive 0module.mk include.","<dir>") $(call mb_make_call,mb_doc_function_flow,mb_make_flow_0module,"Prints flow of recursive 0module.mk include.","<dir>")

View file

@ -61,6 +61,53 @@ endef
$(call mb_make_call,mb_doc_function_deep,mb_proj_module_deps,"Convert other files to local deps.","<mod-bin> <deps>") $(call mb_make_call,mb_doc_function_deep,mb_proj_module_deps,"Convert other files to local deps.","<mod-bin> <deps>")
define mb_proj_grow_deps_phase_process
$(eval MB_PROJ_PHASE_PROCESS_DEPS += $(1))
endef
$(call mb_make_call,mb_doc_function_deep,mb_proj_grow_deps_phase_process,"Grow the deps of the '@process' phase..","<slave-target>")
define mb_proj_grow_deps_phase_compile
$(eval MB_PROJ_PHASE_COMPILE_DEPS += $(1))
endef
$(call mb_make_call,mb_doc_function_deep,mb_proj_grow_deps_phase_compile,"Grow the deps of the '@compile' phase..","<slave-target>")
define mb_proj_grow_deps_phase_link
$(eval MB_PROJ_PHASE_LINK_DEPS += $(1))
endef
$(call mb_make_call,mb_doc_function_deep,mb_proj_grow_deps_phase_link,"Grow the deps of the '@link' phase..","<slave-target>")
define mb_proj_grow_deps_phase_build
$(eval MB_PROJ_PHASE_BUILD_DEPS += $(1))
endef
$(call mb_make_call,mb_doc_function_deep,mb_proj_grow_deps_phase_build,"Grow the deps of the '@build' phase..","<slave-target>")
define mb_proj_grow_deps_phase_test
$(eval MB_PROJ_PHASE_TEST_DEPS += $(1))
endef
$(call mb_make_call,mb_doc_function_deep,mb_proj_grow_deps_phase_test,"Grow the deps of the '@test' phase..","<slave-target>")
define mb_proj_grow_deps_phase_package
$(eval MB_PROJ_PHASE_PACKAGE_DEPS += $(1))
endef
$(call mb_make_call,mb_doc_function_deep,mb_proj_grow_deps_phase_package,"Grow the deps of the '@package' phase..","<slave-target>")
define mb_proj_grow_deps_phase_package_qa
$(eval MB_PROJ_PHASE_PACKAGE_QA_DEPS += $(1))
endef
$(call mb_make_call,mb_doc_function_deep,mb_proj_grow_deps_phase_package_qa,"Grow the deps of the '@package-qa' phase..","<slave-target>")
define mb_proj_grow_deps_phase_package_deploy
$(eval MB_PROJ_PHASE_PACKAGE_DEPLOY_DEPS += $(1))
endef
$(call mb_make_call,mb_doc_function_deep,mb_proj_grow_deps_phase_package_deploy,"Grow the deps of the '@package-deploy' phase..","<slave-target>")
define _mb_proj_flow_step_before define _mb_proj_flow_step_before
$(call mb_make_call,mb_make_echo_phase,$(MB_PROJ_STEP_BEFORE_PREFIX)$@) $(call mb_make_call,mb_make_echo_phase,$(MB_PROJ_STEP_BEFORE_PREFIX)$@)

View file

@ -27,6 +27,6 @@ $(DIST_QA_DOS1_BIN)/@assert: | $(DIST_QA_DOS1_DEPS)
$(call mb_make_call,mb_openmsx_dosctl,$(DIST_QA_DOS1_BIN)) $(call mb_make_call,mb_openmsx_dosctl,$(DIST_QA_DOS1_BIN))
$(call mb_make_call,mb_make_call,mb_make_echo_assert,Assert succesfully $(DIST_QA_DOS1_BIN)/@assert) $(call mb_make_call,mb_make_call,mb_make_echo_assert,Assert succesfully $(DIST_QA_DOS1_BIN)/@assert)
$(call mb_make_call,mb_doc_target,$(DIST_QA_DOS1_BIN)/@assert,"Assert binaries on msxdos1.") $(call mb_make_call,mb_doc_target,$(DIST_QA_DOS1_BIN)/@assert,"Assert binaries on msxdos1.")
MB_PROJ_PHASE_PACKAGE_QA_DEPS += $(DIST_QA_DOS1_BIN)/@assert $(call mb_make_call,mb_proj_grow_deps_phase_package_qa,$(DIST_QA_DOS1_BIN)/@assert)
.PHONY: $(DIST_QA_DOS1_BIN)/@assert .PHONY: $(DIST_QA_DOS1_BIN)/@assert

View file

@ -31,6 +31,6 @@ $(DIST_QA_DOS2_BIN)/@assert: | $(DIST_QA_DOS2_DEPS)
grep -q "SDCC: Hello world..." $(DIST_QA_DOS2_BIN)/ahello2.out grep -q "SDCC: Hello world..." $(DIST_QA_DOS2_BIN)/ahello2.out
$(call mb_make_call,mb_make_echo_assert,Assert succesfully $(DIST_QA_DOS2_BIN)/@assert) $(call mb_make_call,mb_make_echo_assert,Assert succesfully $(DIST_QA_DOS2_BIN)/@assert)
$(call mb_make_call,mb_doc_target,$(DIST_QA_DOS2_BIN)/@assert,"Assert binaries on msxdos2.") $(call mb_make_call,mb_doc_target,$(DIST_QA_DOS2_BIN)/@assert,"Assert binaries on msxdos2.")
MB_PROJ_PHASE_PACKAGE_QA_DEPS += $(DIST_QA_DOS2_BIN)/@assert $(call mb_make_call,mb_proj_grow_deps_phase_package_qa,$(DIST_QA_DOS2_BIN)/@assert)
.PHONY: $(DIST_QA_DOS2_BIN)/@assert .PHONY: $(DIST_QA_DOS2_BIN)/@assert

View file

@ -33,6 +33,6 @@ $(DIST_QA_MSX1_BIN)/@assert: | $(DIST_QA_MSX1_DEPS)
grep -q "SDCC: Hello world..." $(DIST_QA_MSX1_BIN)/ahello2.out grep -q "SDCC: Hello world..." $(DIST_QA_MSX1_BIN)/ahello2.out
$(call mb_make_call,mb_make_echo_assert,Assert succesfully $(DIST_QA_MSX1_BIN)/@assert) $(call mb_make_call,mb_make_echo_assert,Assert succesfully $(DIST_QA_MSX1_BIN)/@assert)
$(call mb_make_call,mb_doc_target,$(DIST_QA_MSX1_BIN)/@assert,"Assert binaries on MSX1 machine.") $(call mb_make_call,mb_doc_target,$(DIST_QA_MSX1_BIN)/@assert,"Assert binaries on MSX1 machine.")
MB_PROJ_PHASE_PACKAGE_QA_DEPS += $(DIST_QA_MSX1_BIN)/@assert $(call mb_make_call,mb_proj_grow_deps_phase_package_qa,$(DIST_QA_MSX1_BIN)/@assert)
.PHONY: $(DIST_QA_MSX1_BIN)/@assert .PHONY: $(DIST_QA_MSX1_BIN)/@assert

View file

@ -59,6 +59,6 @@ $(DIST_QA_MSXHUB_BIN)/@assert: | $(DIST_QA_MSXHUB_DEPS)
grep -q "MAKE COM" $(DIST_QA_MSXHUB_BIN)/utils.out grep -q "MAKE COM" $(DIST_QA_MSXHUB_BIN)/utils.out
$(call mb_make_call,mb_make_echo_assert,Assert succesfully $(DIST_QA_MSXHUB_BIN)/@assert) $(call mb_make_call,mb_make_echo_assert,Assert succesfully $(DIST_QA_MSXHUB_BIN)/@assert)
$(call mb_make_call,mb_doc_target,$(DIST_QA_MSXHUB_BIN)/@assert,"Asserts that all dist artifacts execute results.") $(call mb_make_call,mb_doc_target,$(DIST_QA_MSXHUB_BIN)/@assert,"Asserts that all dist artifacts execute results.")
MB_PROJ_PHASE_TEST_DEPS += $(DIST_QA_MSXHUB_BIN)/@assert $(call mb_make_call,mb_proj_grow_deps_phase_test,$(DIST_QA_MSXHUB_BIN)/@assert)
.PHONY: $(DIST_QA_MSXHUB_BIN)/@assert .PHONY: $(DIST_QA_MSXHUB_BIN)/@assert

5
src/dist/0module.mk vendored
View file

@ -10,7 +10,7 @@ $(DIST_BIN): | @init
$(DIST_BIN)/readme.txt: $(DIST_SRC)/readme.txt | $(DIST_BIN) $(DIST_BIN)/readme.txt: $(DIST_SRC)/readme.txt | $(DIST_BIN)
$(call mb_make_call,mb_conv_unix2dos,$<,$@) $(call mb_make_call,mb_conv_unix2dos,$<,$@)
MB_PROJ_PHASE_PROCESS_DEPS += $(DIST_BIN)/readme.txt $(call mb_make_call,mb_proj_grow_deps_phase_process,$(DIST_BIN)/readme.txt)
$(DIST_BIN)/ahello1.com: bin/ahello-m80/ahello.com | $(DIST_BIN) $(DIST_BIN)/ahello1.com: bin/ahello-m80/ahello.com | $(DIST_BIN)
$(call mb_make_call,mb_os_file_copy,$<,$@) $(call mb_make_call,mb_os_file_copy,$<,$@)
@ -25,4 +25,5 @@ $(call mb_make_call,mb_doc_target,$(DIST_BIN)/@prepare,"Prepare folder with bina
$(DIST_OUT): | $(DIST_BIN)/@prepare $(DIST_OUT): | $(DIST_BIN)/@prepare
$(call mb_make_call,mb_create_dist,$(DIST_BIN),$@) $(call mb_make_call,mb_create_dist,$(DIST_BIN),$@)
$(call mb_make_call,mb_doc_target,$(DIST_OUT),"Build archive distribution artifact.") $(call mb_make_call,mb_doc_target,$(DIST_OUT),"Build archive distribution artifact.")
MB_PROJ_PHASE_PACKAGE_DEPS += $(DIST_OUT) $(call mb_make_call,mb_proj_grow_deps_phase_package,$(DIST_OUT))

View file

@ -16,19 +16,19 @@ $(call mb_make_call,mb_doc_target_deep,$(MAKE_ON_MSX_BIN))
$(MAKE_ON_MSX_BIN)/nfbsshot.mac: $(MAKE_ON_MSX_SRC)/nfbsshot.mac | $(MAKE_ON_MSX_BIN) $(MAKE_ON_MSX_BIN)/nfbsshot.mac: $(MAKE_ON_MSX_SRC)/nfbsshot.mac | $(MAKE_ON_MSX_BIN)
$(call mb_make_call,mb_conv_unix2dos,$<,$@) $(call mb_make_call,mb_conv_unix2dos,$<,$@)
$(call mb_make_call,mb_doc_target_deep,$(MAKE_ON_MSX_BIN)/nfbsshot.mac) $(call mb_make_call,mb_doc_target_deep,$(MAKE_ON_MSX_BIN)/nfbsshot.mac)
MB_PROJ_PHASE_PROCESS_DEPS += $(MAKE_ON_MSX_BIN)/nfbsshot.mac $(call mb_make_call,mb_proj_grow_deps_phase_process,$(MAKE_ON_MSX_BIN)/nfbsshot.mac)
$(MAKE_ON_MSX_BIN)/nfbsshot.mf: $(MAKE_ON_MSX_SRC)/nfbsshot.mf $(MAKE_ON_MSX_BIN)/nfbsshot.mac $(MAKE_ON_MSX_BIN)/nfbsshot.mf: $(MAKE_ON_MSX_SRC)/nfbsshot.mf $(MAKE_ON_MSX_BIN)/nfbsshot.mac
$(call mb_make_call,mb_conv_unix2dos,$<,$@) $(call mb_make_call,mb_conv_unix2dos,$<,$@)
$(call mb_make_call,mb_doc_target_deep,$(MAKE_ON_MSX_BIN)/nfbsshot.mf) $(call mb_make_call,mb_doc_target_deep,$(MAKE_ON_MSX_BIN)/nfbsshot.mf)
MB_PROJ_PHASE_PROCESS_DEPS += $(MAKE_ON_MSX_BIN)/nfbsshot.mf $(call mb_make_call,mb_proj_grow_deps_phase_process,$(MAKE_ON_MSX_BIN)/nfbsshot.mf)
$(MAKE_ON_MSX_BIN)/build.bat: $(MAKE_ON_MSX_SRC)/build.bat $(MAKE_ON_MSX_BIN)/nfbsshot.mf $(MAKE_ON_MSX_BIN)/build.bat: $(MAKE_ON_MSX_SRC)/build.bat $(MAKE_ON_MSX_BIN)/nfbsshot.mf
$(call mb_make_call,mb_conv_unix2dos,$<,$@) $(call mb_make_call,mb_conv_unix2dos,$<,$@)
$(call mb_make_call,mb_doc_target_deep,$(MAKE_ON_MSX_BIN)/build.bat) $(call mb_make_call,mb_doc_target_deep,$(MAKE_ON_MSX_BIN)/build.bat)
MB_PROJ_PHASE_PROCESS_DEPS += $(MAKE_ON_MSX_BIN)/build.bat $(call mb_make_call,mb_proj_grow_deps_phase_process,$(MAKE_ON_MSX_BIN)/build.bat)
$(MAKE_ON_MSX_BIN)/nfbsshot.bin: $(MAKE_ON_MSX_BIN)/build.bat $(MAKE_ON_MSX_BIN)/nfbsshot.bin: $(MAKE_ON_MSX_BIN)/build.bat
@ -38,7 +38,7 @@ $(call mb_make_call,mb_doc_target_deep,$(MAKE_ON_MSX_BIN)/nfbsshot.bin)
$(MAKE_ON_MSX_BIN)/@build: $(MAKE_ON_MSX_BIN)/nfbsshot.bin $(MAKE_ON_MSX_BIN)/@build: $(MAKE_ON_MSX_BIN)/nfbsshot.bin
$(call mb_make_call,mb_doc_target,$(MAKE_ON_MSX_BIN)/@build,"Compiles binary with make on msx.") $(call mb_make_call,mb_doc_target,$(MAKE_ON_MSX_BIN)/@build,"Compiles binary with make on msx.")
MB_PROJ_PHASE_BUILD_DEPS +=$(MAKE_ON_MSX_BIN)/@build $(call mb_make_call,mb_proj_grow_deps_phase_build,$(MAKE_ON_MSX_BIN)/@build)
.PHONY: $(MAKE_ON_MSX_BIN)/@build .PHONY: $(MAKE_ON_MSX_BIN)/@build