diff --git a/README.md b/README.md index a3cb169..2627a47 100644 --- a/README.md +++ b/README.md @@ -28,56 +28,82 @@ For debian use; apt-get install make wget tar gawk grep dos2unix sdcc openmsx ffmpeg rsync -## Usage 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 +## Install Classic 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 -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 - Lists build variables. - * @help-variable-deep - Lists deep variables. - * @help-variable-rock - Lists rock variables. - * @help-variable-flow - Lists flow variables. - + * @help-variable-i18n * @help-function - Lists build functions. - * @help-function-deep - Lists deep functions. - * @help-function-flow - Lists flow functions. - * @help-target - Lists build targets. - * @help-target-deep - Lists deep targets. - + * @help-target-run * @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 @@ -116,7 +142,7 @@ When you want to see whats happening do a debug run; ## 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-tree will not get phony, (and thus @@include-root not on top) * 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 +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 * 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 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 isascii function (death with unicode) * Add lowercase and uppercase functions (full 21bit unicode support) * 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 checksum function to calc checksum for file * 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: Delete all Old-Fashioned Suffix Rules code * 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: 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 diff --git a/lib/make/ᐅᖓᕙᕆᐊᖅᓯᓂᖅ/mb_os.mk b/lib/make/ᐅᖓᕙᕆᐊᖅᓯᓂᖅ/mb_os.mk index 8551b2b..43a14dc 100644 --- a/lib/make/ᐅᖓᕙᕆᐊᖅᓯᓂᖅ/mb_os.mk +++ b/lib/make/ᐅᖓᕙᕆᐊᖅᓯᓂᖅ/mb_os.mk @@ -42,6 +42,30 @@ 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.","") + + +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."," ") + + +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.","") + + +define mb_os_file_touch +$(MB_ᕽᕽᕽ   )touch $(1) +endef +$(call mb_make_call,mb_doc_function,mb_os_file_touch,"Changes file timestamps.","") + + define mb_os_dir_delete $(MB_ᕽᕽᕽ   )$(MB_OS_RMDIR) $(1) endef @@ -54,18 +78,6 @@ endef $(call mb_make_call,mb_doc_function,mb_os_dir_create,"Creates an folder.","") -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.","") - - -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."," ") - - 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)") endef