Updated docs a bit and added missing os functions and reordered them.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -13s

This commit is contained in:
Willem Cazander 2024-07-13 15:05:01 +02:00
parent df7b435b56
commit 50a2187960
2 changed files with 93 additions and 50 deletions

107
README.md
View file

@ -28,56 +28,82 @@ For debian use;
apt-get install make wget tar gawk grep dos2unix sdcc openmsx ffmpeg rsync apt-get install make wget tar gawk grep dos2unix sdcc openmsx ffmpeg rsync
## Usage Classic ## Install Classic
Have access or copy the `lib` folder in your project and start writing make files.
Include the `lib/make/msxbuild.mk` and override the paths if needed;
* MB_SDCC_PATH=/usr/bin
* MB_OPENMSX_PATH=/usr/bin
## Usage Docker
TODO TODO
## Install Docker
TODO
## Usage Setup
Most simple `Makefile` example;
PATH_MSXBUILD ?= ~/somewhere/local/copy/msxbuild/lib
# Optional set own prefix BEFORE include mxsbuild
.RECIPEPREFIX := _
include $(PATH_MSXBUILD)/msxbuild.mk
# Write normal make rules
Use simple with 0module structure add tree include structure.
PATH_SRC := src
$(call mb_make_call,mb_flow_0module_setup,$(PATH_SRC))
Or more complex do a full flow setup of project with;
(note this will call also the 0module_setup for you)
PATH_BIN := bin
PATH_SRC := src
$(call mb_make_call,mb_setup_default,$(PATH_BIN),$(PATH_SRC))
# Write normal and/or dynamic flow rules in many 0module.mk files.
## Rule Writing
TODO: Link to example project on github a few ways to compile and test hello.
## Usage Help ## Usage Help
Running: `make` When using the `mb_setup_default` this add a help system which works by running: `make @help | grep "*"`
Welcome to the MSXBUILD help system.
For detailed fire help use one of the following targets;
* @help-variable * @help-variable
Lists build variables.
* @help-variable-deep * @help-variable-deep
Lists deep variables.
* @help-variable-rock * @help-variable-rock
Lists rock variables.
* @help-variable-flow * @help-variable-flow
Lists flow variables. * @help-variable-i18n
* @help-function * @help-function
Lists build functions.
* @help-function-deep * @help-function-deep
Lists deep functions.
* @help-function-flow * @help-function-flow
Lists flow functions.
* @help-target * @help-target
Lists build targets.
* @help-target-deep * @help-target-deep
Lists deep targets. * @help-target-run
* @help-all * @help-all
Lists all documented information. * @help-firemake
* @clean
* @init
* @prepare
* @process
* @compile
* @link
* @build
* @test
* @package
* @package-qa
* @package-deploy
* @all
* @flight-video-build
* @flight-video-test
* @flight-video-package-qa
Running: `make @help-all | grep "*" | wc -l` to count all documented items of an project;
381
## Example Project ## Example Project
@ -116,7 +142,7 @@ When you want to see whats happening do a debug run;
## Errata ## Errata
* Very sometimes the fail_after "boot_err" watchdog doesn't get canceled * (?19++) Very sometimes the fail_after "boot_err" watchdog doesn't get canceled
* Make: @@include-mods will not get chained, it doesn't list ANY dep anymore * Make: @@include-mods will not get chained, it doesn't list ANY dep anymore
* Make: @@include-tree will not get phony, (and thus @@include-root not on top) * Make: @@include-tree will not get phony, (and thus @@include-root not on top)
* boot_exec_setcolor: does not work on MSX1 vdp TMS9918 * boot_exec_setcolor: does not work on MSX1 vdp TMS9918
@ -152,16 +178,21 @@ When you want to see whats happening do a debug run;
## Make4++ backlog issues ## Make4++ backlog issues
Since `.RECIPEPREFIX` is added to make, it broke library support and having per call different
dynamic white space rules is also really hard for a human brain.
To fix make5 will use binary files to express the rules.
* Add a few new define's to have official make documentation * Add a few new define's to have official make documentation
* BUG: Unicode read+parse ok but function call fails on `include $(MB__BASEPATH)/lib/make/प्रणालीᐥᔆʸᔆᐪᓫᔿ/mb_doc.mk`. * BUG: Unicode read+parse ok but function call fails on `include $(MB__BASEPATH)/lib/make/प्रणालीᐥᔆʸᔆᐪᓫᔿ/mb_doc.mk`.
* Add function `call_real` which exits on undefined call argument * Add a checked call function `ccall` which exits on undefined call argument
* Add `call` and `ccall` debug trace option
* Add -e option to make internal echo command for escaped sequences * Add -e option to make internal echo command for escaped sequences
* Add native OS functions for `os_copy,os_rmfile,rmdir,mkdir,touch,delfile,deldir` * Add native OS functions for `os_echo,os_file_copy,os_file_delete,os_folder_delete,os_folder_create,etc`
* Add string letters function * Add string letters function
* Add string isascii function (death with unicode) * Add string isascii function (death with unicode)
* Add lowercase and uppercase functions (full 21bit unicode support) * Add lowercase and uppercase functions (full 21bit unicode support)
* Add XML output for help system for integration with IDE's * Add XML output for help system for integration with IDE's
* Add rwildcard for deeper searches * Add `wildcard_treewalker` for deeper searches
* Add namespace support for variables/functions/targets like: moduleX::bin/prog.o: moduleX::src/prog.c * Add namespace support for variables/functions/targets like: moduleX::bin/prog.o: moduleX::src/prog.c
* Add checksum function to calc checksum for file * Add checksum function to calc checksum for file
* Add `os_copy_diff` function to use checksums to copy only changed files * Add `os_copy_diff` function to use checksums to copy only changed files
@ -174,7 +205,7 @@ When you want to see whats happening do a debug run;
* Make5: upgrade to new BDOS split file and folder API in OS kernel VFS layer * Make5: upgrade to new BDOS split file and folder API in OS kernel VFS layer
* Make5: Delete all Old-Fashioned Suffix Rules code * Make5: Delete all Old-Fashioned Suffix Rules code
* Make5: Delete .EXPORT_ALL_VARIABLES and `export` without variable * Make5: Delete .EXPORT_ALL_VARIABLES and `export` without variable
* Make5: Delete VPATH search variable (replace with namespace vpath ??) * Make5: (Opt?) Delete VPATH search variable (replace with namespace vpath ??)
* Make5: Delete/refactor all (old) code that make the make code ugly * Make5: Delete/refactor all (old) code that make the make code ugly
* Make5: Adds zillala (emacs like) bug reporting output for when make fails script or internally * Make5: Adds zillala (emacs like) bug reporting output for when make fails script or internally
* Make6: Only support 18bit four corner method, fixed i18n words, no letters, no ascii, no unicode * Make6: Only support 18bit four corner method, fixed i18n words, no letters, no ascii, no unicode

View file

@ -42,6 +42,30 @@ endif
endif endif
define mb_os_file_create
$(MB_   )echo "" > $(1)
endef
$(call mb_make_call,mb_doc_function,mb_os_file_create,"Creates an empty file.","<file>")
define mb_os_file_copy
$(MB_   )$(MB_OS_COPY) $(1) $(2)
endef
$(call mb_make_call,mb_doc_function,mb_os_file_copy,"Copy an file.","<in> <out>")
define mb_os_file_delete
$(MB_   )$(MB_OS_RM) $(1)
endef
$(call mb_make_call,mb_doc_function,mb_os_file_delete,"Deletes an file.","<file>")
define mb_os_file_touch
$(MB_   )touch $(1)
endef
$(call mb_make_call,mb_doc_function,mb_os_file_touch,"Changes file timestamps.","<file>")
define mb_os_dir_delete define mb_os_dir_delete
$(MB_   )$(MB_OS_RMDIR) $(1) $(MB_   )$(MB_OS_RMDIR) $(1)
endef endef
@ -54,18 +78,6 @@ endef
$(call mb_make_call,mb_doc_function,mb_os_dir_create,"Creates an folder.","<dir>") $(call mb_make_call,mb_doc_function,mb_os_dir_create,"Creates an folder.","<dir>")
define mb_os_file_delete
$(MB_   )$(MB_OS_RM) $(1)
endef
$(call mb_make_call,mb_doc_function,mb_os_file_delete,"Deletes an file.","<file>")
define mb_os_file_copy
$(MB_   )$(MB_OS_COPY) $(1) $(2)
endef
$(call mb_make_call,mb_doc_function,mb_os_file_copy,"Copy an file.","<in> <out>")
define mb_os_crayon_tagged_echo define mb_os_crayon_tagged_echo
$(MB_   )$(if $(filter -1,$(MB_OS_TERM_COLORS)),@echo $(MB_I18N_OS_CRAYON_TAG) $(2),@echo -e "\x1B[$(1)m$(MB_I18N_OS_CRAYON_TAG)\x1B[39m $(2)") $(MB_   )$(if $(filter -1,$(MB_OS_TERM_COLORS)),@echo $(MB_I18N_OS_CRAYON_TAG) $(2),@echo -e "\x1B[$(1)m$(MB_I18N_OS_CRAYON_TAG)\x1B[39m $(2)")
endef endef