Done msxpipe build steps.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 3s

This commit is contained in:
Willem Cazander 2024-07-02 16:31:42 +02:00
parent 8d84a1e65c
commit a84972e960
14 changed files with 80 additions and 79 deletions

View file

@ -39,6 +39,44 @@ Include the `lib/make/msxbuild.mk` and override the paths if needed;
TODO
## Usage Help
Running: `make`
Use 'make help' for possible targets and documention.
Running: `make help`
Welcome to the MSXBUILD help system.
For detailed help use one of the following targets;
* help@target
* help@function
* help@variable
Running: `make help@function`
Documention of the make functions;
* mb_doc_function <name> [desc] [args]
Prints formatted documention of an function.
* mb_doc_variable <name> [desc] [value]
Prints formatted documention of an variable.
* mb_doc_target <name> [desc]
Prints formatted documention of an target.
* mb_doc_project <name>
Prints formatted documention of an project (help).
* mb_doc_show_help@all
Displays text for 'make'
...
## Example Project
When you want to see whats happening do a debug run;
@ -48,7 +86,7 @@ When you want to see whats happening do a debug run;
real 0m3.223s
debug run at 11 Mhz;
time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on make vassert-all
time MB_OPENMSX_HEADLESS=off MB_OPENMSX_THROTTLE=on make bin/@assert-all
real 1m4.856s
debug run real msx speed;
@ -70,19 +108,6 @@ When you want to see whats happening do a debug run;
manual test msxhub on machine;
make DIST_QA_MSXHUB_MACHINE=Philips_VG_8000 bin/dist-qa-msxhub/@run
## Functions
Current set is WIP.
* mb_autoexec_write_default `<dir> [text-mode]`
* mb_autoexec_show_gui40 `<dir> [cmd]`
* mb_autoexec_show_gui40_mouse `<dir> [cmd]`
* mb_autoexec_show_gui80 `<dir> [cmd]`
* mb_autoexec_show_gui80_mouse `<dir> [cmd]`
* mb_autoexec_safe_cmd `<dir> <cmd> [text-mode]`
* mb_autoexec_safe_test `<dir> <cmd> [text-mode]`
## Errata
* Doesn't work on windows

View file

@ -6,8 +6,8 @@ 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"
MB_DOC_TXT_BUILD_VARIABLE := "Documention of the MSXBUILD variables;\\n"
MB_DOC_TXT_BUILD_FUNCTION := "Documention of the MSXBUILD functions;\\n"
MB_DOC_TXT_BUILD_VARIABLE := "Documention of the make variables;\\n"
MB_DOC_TXT_BUILD_FUNCTION := "Documention of the make functions;\\n"
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))

View file

@ -1,44 +1,38 @@
# TODO: rename
define mb_autoexec_safe_cmd
$(call mb_autoexec_write_default,$(1),$(3))
define mb_msxpipe_safe_cmd
$(call mb_autoexec_write_default,$(1))
$(call mb_autoexec_append_safe_cmd,$(1),$(2))
$(call mb_autoexec_append_exit,$(1))
$(call mb_openmsx_dosctl,$(1),$(3))
endef
MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_autoexec_safe_cmd,"Runs openMSX and safely executes a command.","<dir> <cmd> [text-mode]")
MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_msxpipe_safe_cmd,"Runs openMSX and safely executes one command.","<dir> <cmd> [machine]")
define mb_autoexec_safe_test
$(call mb_autoexec_write_default,$(1),$(3))
define mb_msxpipe_safe_test
$(call mb_autoexec_write_default,$(1))
$(call mb_autoexec_append_safe_test,$(1),$(2))
$(call mb_autoexec_append_exit,$(1))
$(call mb_openmsx_dosctl,$(1),$(3))
endef
MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_autoexec_safe_test,"Runs openMSX and safely executes a test.","<dir> <cmd> [text-mode]")
MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_msxpipe_safe_test,"Runs openMSX and safely executes one test.","<dir> <cmd> [machine]")
define _mb_autoexec_show_gui
$(call mb_autoexec_write_default,$(1),$(2))
define _mb_msxpipe_show_gui
$(call mb_autoexec_write_default,$(1))
$(call mb_autoexec_append_stop_fail,$(1))
$(call mb_autoexec_append_show_gui,$(1))
$(if $(filter mouse,$(4)),$(call mb_autoexec_append_joyporta_mouse,$(1)))
$(call mb_autoexec_append_echo,$(1),mb::exit Type shutdown to stop emulation)
$(if $(3),$(call mb_autoexec_append_echo,$(1),mb::show command $(3)))
$(if $(3),$(call mb_autoexec_append_cmd,$(1),$(3)))
$(call mb_autoexec_append_echo,$(1),mb::help Run shutdown to stop emulation)
$(if $(2),$(call mb_autoexec_append_echo,$(1),mb::show command $(2)))
$(if $(2),$(call mb_autoexec_append_cmd,$(1),$(2)))
$(call mb_openmsx_dosctl,$(1),$(3))
endef
define mb_autoexec_show_gui40
$(call _mb_autoexec_show_gui,$(1),40,$(2))
define mb_msxpipe_show_gui
$(call _mb_msxpipe_show_gui,$(1),$(2),$(3))
endef
MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_msxpipe_show_gui,"Runs openMSX with renderer and optionals.","<dir> [cmd] [machine]")
define mb_autoexec_show_gui40_mouse
$(call _mb_autoexec_show_gui,$(1),40,$(2),mouse)
define mb_msxpipe_show_gui_mouse
$(call _mb_msxpipe_show_gui,$(1),$(2),$(3),mouse)
endef
define mb_autoexec_show_gui80
$(call _mb_autoexec_show_gui,$(1),80,$(2))
endef
define mb_autoexec_show_gui80_mouse
$(call _mb_autoexec_show_gui,$(1),80,$(2),mouse)
endef
MB_DOC_HELP_FUNCTION += $(call mb_doc_function,mb_msxpipe_show_gui_mouse,"Runs openMSX with renderer and mouse and optionals.","<dir> [cmd] [machine]")

View file

@ -10,15 +10,13 @@ $(AHELLO_M80_TEST_BIN)/ahello.com: $(AHELLO_M80_BIN)/ahello.com | $(AHELLO_M80_T
$(call mb_copy,$<,$@)
$(AHELLO_M80_TEST_BIN)/@run: | $(AHELLO_M80_TEST_BIN)/ahello.com
$(call mb_autoexec_show_gui80,$(AHELLO_M80_TEST_BIN))
$(call mb_openmsx_dosctl,$(AHELLO_M80_TEST_BIN))
$(call mb_msxpipe_show_gui,$(AHELLO_M80_TEST_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(AHELLO_M80_TEST_BIN)/@run,"Run binaries from ahello-m80.")
.PHONY: $(AHELLO_M80_TEST_BIN)/@run
$(AHELLO_M80_TEST_BIN)/@assert: | $(AHELLO_M80_TEST_BIN)/ahello.com
$(call mb_delete,$(AHELLO_M80_TEST_BIN)/ahello.out)
$(call mb_autoexec_safe_test,$(AHELLO_M80_TEST_BIN),ahello > ahello.out)
$(call mb_openmsx_dosctl,$(AHELLO_M80_TEST_BIN))
$(call mb_msxpipe_safe_test,$(AHELLO_M80_TEST_BIN),ahello > ahello.out)
grep "M80: Hello world..." $(AHELLO_M80_TEST_BIN)/ahello.out
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(AHELLO_M80_TEST_BIN)/@assert,"Assert binaries from ahello-m80.")
.PHONY: $(AHELLO_M80_TEST_BIN)/@assert

View file

@ -13,20 +13,16 @@ $(AHELLO_M80_BIN)/%.mac: $(AHELLO_M80_SRC)/%.mac | $(AHELLO_M80_BIN)
$(call mb_unix2dos,$<,$@)
$(AHELLO_M80_BIN)/ahello.rel: $(AHELLO_M80_BIN)/ahello.mac
$(call mb_autoexec_safe_cmd,$(AHELLO_M80_BIN),m80 =ahello/Z)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
$(call mb_msxpipe_safe_cmd,$(AHELLO_M80_BIN),m80 =ahello/Z)
$(AHELLO_M80_BIN)/ahello.hex: $(AHELLO_M80_BIN)/ahello.rel
$(call mb_autoexec_safe_cmd,$(AHELLO_M80_BIN),l80 ahello$(MB_CHAR_COMMA)ahello/N/X/Y/E)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
$(call mb_msxpipe_safe_cmd,$(AHELLO_M80_BIN),l80 ahello$(MB_CHAR_COMMA)ahello/N/X/Y/E)
$(AHELLO_M80_BIN)/ahello.com: | $(AHELLO_M80_BIN)/ahello.hex
$(call mb_autoexec_safe_cmd,$(AHELLO_M80_BIN),hextocom ahello)
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
$(call mb_msxpipe_safe_cmd,$(AHELLO_M80_BIN),hextocom ahello)
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(AHELLO_M80_BIN)/ahello.com,"Compiles hello world with macro80.")
$(AHELLO_M80_BIN)/@run: | $(AHELLO_M80_BIN)/ahello.com
$(call mb_autoexec_show_gui80,$(AHELLO_M80_BIN))
$(call mb_openmsx_dosctl,$(AHELLO_M80_BIN))
$(call mb_msxpipe_show_gui,$(AHELLO_M80_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(AHELLO_M80_BIN)/@run,"Run the compiled hello world from macro80.")
.PHONY: $(AHELLO_M80_BIN)/@run

View file

@ -10,15 +10,13 @@ $(AHELLO_SDCC_TEST_BIN)/ahello.com: $(AHELLO_SDCC_BIN)/ahello.com | $(AHELLO_SDC
$(call mb_copy,$<,$@)
$(AHELLO_SDCC_TEST_BIN)/@run: | $(AHELLO_SDCC_TEST_BIN)/ahello.com
$(call mb_autoexec_show_gui80,$(AHELLO_SDCC_TEST_BIN))
$(call mb_openmsx_dosctl,$(AHELLO_SDCC_TEST_BIN))
$(call mb_msxpipe_show_gui,$(AHELLO_SDCC_TEST_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(AHELLO_SDCC_TEST_BIN)/@run,"Run binaries from ahello-sdcc.")
.PHONY: $(AHELLO_SDCC_TEST_BIN)/@run
$(AHELLO_SDCC_TEST_BIN)/@assert: | $(AHELLO_SDCC_TEST_BIN)/ahello.com
$(call mb_delete,$(AHELLO_SDCC_TEST_BIN)/ahello.out)
$(call mb_autoexec_safe_test,$(AHELLO_SDCC_TEST_BIN),ahello > ahello.out)
$(call mb_openmsx_dosctl,$(AHELLO_SDCC_TEST_BIN))
$(call mb_msxpipe_safe_test,$(AHELLO_SDCC_TEST_BIN),ahello > ahello.out)
grep "SDCC: Hello world..." $(AHELLO_SDCC_TEST_BIN)/ahello.out
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(AHELLO_SDCC_TEST_BIN)/@assert,"Assert binaries from ahello-sdcc.")
.PHONY: $(AHELLO_SDCC_TEST_BIN)/@assert

View file

@ -17,7 +17,6 @@ $(AHELLO_SDCC_BIN)/ahello.com: $(AHELLO_SDCC_BIN)/ahello.hex
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(AHELLO_SDCC_BIN)/ahello.com,"Compiles hello world with sdcc.")
$(AHELLO_SDCC_BIN)/@run: | $(AHELLO_SDCC_BIN)/ahello.com
$(call mb_autoexec_show_gui80,$(AHELLO_SDCC_BIN))
$(call mb_openmsx_dosctl,$(AHELLO_SDCC_BIN))
$(call mb_msxpipe_show_gui,$(AHELLO_SDCC_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(AHELLO_SDCC_BIN)/@run,"Run the compiled hello world from sdcc.")
.PHONY: $(AHELLO_SDCC_BIN)/@run

View file

@ -12,8 +12,7 @@ $(DIST_QA_DOS1_BIN)/%: $(DIST_BIN)/% | $(DIST_QA_DOS1_BIN) $(DIST_DEPS)
$(call mb_copy,$<,$@)
$(DIST_QA_DOS1_BIN)/@run: | $(DIST_QA_DOS1_DEPS)
$(call mb_autoexec_show_gui80,$(DIST_QA_DOS1_BIN))
$(call mb_openmsx_dosctl,$(DIST_QA_DOS1_BIN))
$(call mb_msxpipe_show_gui,$(DIST_QA_DOS1_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(DIST_QA_DOS1_BIN)/@run,"Run binaries on msxdos1 machine.")
.PHONY: $(DIST_QA_DOS1_BIN)/@run

View file

@ -12,8 +12,7 @@ $(DIST_QA_DOS2_BIN)/%: $(DIST_BIN)/% | $(DIST_QA_DOS2_BIN) $(DIST_DEPS)
$(call mb_copy,$<,$@)
$(DIST_QA_DOS2_BIN)/@run: | $(DIST_QA_DOS2_DEPS)
$(call mb_autoexec_show_gui80,$(DIST_QA_DOS2_BIN))
$(call mb_openmsx_dosctl,$(DIST_QA_DOS2_BIN))
$(call mb_msxpipe_show_gui,$(DIST_QA_DOS2_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(DIST_QA_DOS2_BIN)/@run,"Run binaries on msxdos2 machine.")
.PHONY: $(DIST_QA_DOS2_BIN)/@run

View file

@ -13,8 +13,7 @@ $(DIST_QA_MSX1_BIN)/%: $(DIST_BIN)/% | $(DIST_QA_MSX1_BIN) $(DIST_DEPS)
$(call mb_copy,$<,$@)
$(DIST_QA_MSX1_BIN)/@run: | $(DIST_QA_MSX1_DEPS)
$(call mb_autoexec_show_gui40,$(DIST_QA_MSX1_BIN))
$(call mb_openmsx_dosctl,$(DIST_QA_MSX1_BIN),$(DIST_QA_MSX1_MACHINE))
$(call mb_msxpipe_show_gui,$(DIST_QA_MSX1_BIN),,$(DIST_QA_MSX1_MACHINE))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(DIST_QA_MSX1_BIN)/@run,"Run binaries on MSX1 machine.")
.PHONY: $(DIST_QA_MSX1_BIN)/@run

View file

@ -35,8 +35,7 @@ $(DIST_QA_MSXHUB_BIN)/%: $(DIST_BIN)/% | $(DIST_QA_MSXHUB_BIN) $(DIST_DEPS)
$(call mb_copy,$<,$@)
$(DIST_QA_MSXHUB_BIN)/@run: | $(DIST_QA_MSXHUB_DEPS)
$(call mb_autoexec_show_gui80,$(DIST_QA_MSXHUB_BIN))
$(call mb_openmsx_dosctl,$(DIST_QA_MSXHUB_BIN),$(DIST_QA_MSXHUB_MACHINE))
$(call mb_msxpipe_show_gui,$(DIST_QA_MSXHUB_BIN),,$(DIST_QA_MSXHUB_MACHINE))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(DIST_QA_MSXHUB_BIN)/@run,"Run the dist with all msxhub packages.")
.PHONY: $(DIST_QA_MSXHUB_BIN)/@run
@ -44,7 +43,7 @@ $(DIST_QA_MSXHUB_BIN)/@assert: | $(DIST_QA_MSXHUB_DEPS)
$(call mb_delete,$(DIST_QA_MSXHUB_BIN)/ahello1.out)
$(call mb_delete,$(DIST_QA_MSXHUB_BIN)/ahello2.out)
$(call mb_delete,$(DIST_QA_MSXHUB_BIN)/utils.out)
$(call mb_autoexec_write_default,$(DIST_QA_MSXHUB_BIN),80)
$(call mb_autoexec_write_default,$(DIST_QA_MSXHUB_BIN))
$(call mb_autoexec_append_safe_test,$(DIST_QA_MSXHUB_BIN),ahello1 > ahello1.out)
$(call mb_autoexec_append_safe_test,$(DIST_QA_MSXHUB_BIN),ahello2 > ahello2.out)
$(call mb_autoexec_append_safe_test,$(DIST_QA_MSXHUB_BIN),dir utils > utils.out)

View file

@ -20,8 +20,7 @@ $(MAKE_ON_MSX_BIN)/build.bat: $(MAKE_ON_MSX_SRC)/build.bat | $(MAKE_ON_MSX_BIN)/
$(call mb_unix2dos,$<,$@)
$(MAKE_ON_MSX_BIN)/nfbsshot.bin: | $(MAKE_ON_MSX_BIN)/build.bat
$(call mb_autoexec_safe_cmd,$(MAKE_ON_MSX_BIN),build shutdown)
$(call mb_openmsx_dosctl,$(MAKE_ON_MSX_BIN))
$(call mb_msxpipe_safe_cmd,$(MAKE_ON_MSX_BIN),build shutdown)
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MAKE_ON_MSX_BIN)/nfbsshot.bin,"Compiles binary with make on msx.")
$(MAKE_ON_MSX_BIN)/@assert: | $(MAKE_ON_MSX_BIN)/nfbsshot.bin
@ -30,8 +29,7 @@ MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MAKE_ON_MSX_BIN)/@assert,"Asserts t
.PHONY: $(MAKE_ON_MSX_BIN)/@assert
$(MAKE_ON_MSX_BIN)/@run: | $(MAKE_ON_MSX_BIN)/build.bat
$(call mb_autoexec_show_gui80,$(MAKE_ON_MSX_BIN))
$(call mb_openmsx_dosctl,$(MAKE_ON_MSX_BIN))
$(call mb_msxpipe_show_gui,$(MAKE_ON_MSX_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MAKE_ON_MSX_BIN)/@run,"Run the make build manually.")
.PHONY: $(MAKE_ON_MSX_BIN)/@run

View file

@ -10,15 +10,13 @@ $(MBBOOT80_TEST_BIN)/mbboot80.com: $(MBBOOT80_BIN)/mbboot80.com | $(MBBOOT80_TES
$(call mb_copy,$<,$@)
$(MBBOOT80_TEST_BIN)/@run: | $(MBBOOT80_TEST_BIN)/mbboot80.com
$(call mb_autoexec_show_gui80,$(MBBOOT80_TEST_BIN))
$(call mb_openmsx_dosctl,$(MBBOOT80_TEST_BIN))
$(call mb_msxpipe_show_gui,$(MBBOOT80_TEST_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MBBOOT80_TEST_BIN)/@run,"Run binaries from mbboot80.")
.PHONY: $(MBBOOT80_TEST_BIN)/@run
$(MBBOOT80_TEST_BIN)/@assert: | $(MBBOOT80_TEST_BIN)/mbboot80.com
$(call mb_delete,$(MBBOOT80_TEST_BIN)/ahello.out)
$(call mb_autoexec_safe_test,$(MBBOOT80_TEST_BIN),mbboot80 > mbboot80.out)
$(call mb_openmsx_dosctl,$(MBBOOT80_TEST_BIN))
$(call mb_msxpipe_safe_test,$(MBBOOT80_TEST_BIN),mbboot80 > mbboot80.out)
grep "mb::boot mode 80" $(MBBOOT80_TEST_BIN)/mbboot80.out
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MBBOOT80_TEST_BIN)/@assert,"Assert binaries from mbboot80.")
.PHONY: $(MBBOOT80_TEST_BIN)/@assert

View file

@ -17,8 +17,7 @@ $(MBBOOT80_BIN)/mbboot80.com: $(MBBOOT80_BIN)/mbboot80.hex
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MBBOOT80_BIN)/mbboot80.com,"Compiles mbboot80.")
$(MBBOOT80_BIN)/@run: | $(MBBOOT80_BIN)/mbboot80.com
$(call mb_autoexec_show_gui80,$(MBBOOT80_BIN))
$(call mb_openmsx_dosctl,$(MBBOOT80_BIN))
$(call mb_msxpipe_show_gui,$(MBBOOT80_BIN))
MB_DOC_HELP_TARGET += $(call mb_doc_target,$(MBBOOT80_BIN)/@run,"Run the compiled mbboot80.")
.PHONY: $(MBBOOT80_BIN)/@run