Split prolog to mv_env and msxbuild file.
All checks were successful
Run test asserts / Test-Asserts (push) Successful in -10s

This commit is contained in:
Willem Cazander 2024-07-13 00:14:51 +02:00
parent 0bf46a9ff3
commit 21275aaded
4 changed files with 157 additions and 157 deletions

View file

@ -13,17 +13,14 @@ MB_PROJ_META_WEBSITE ?= https://code.distributedrebirth.love/arch-msx/msxbuild
.RECIPEPREFIX := _ .RECIPEPREFIX := _
.DEFAULT_GOAL := @all .DEFAULT_GOAL := @all
-include Makelocal.mk -include Makelocal.mk
include $(PATH_MSXBUILD)/msxbuild-prolog.mk
include $(PATH_MSXBUILD)/msxbuild.mk include $(PATH_MSXBUILD)/msxbuild.mk
$(call mb_make_call,mb_setup_default,$(PATH_BIN),$(PATH_SRC)) $(call mb_make_call,mb_setup_default,$(PATH_BIN),$(PATH_SRC))
# Optional: make faster and setup graph root # Optional: make faster and setup graph root
.PHONY: Makefile .PHONY: Makefile
.PHONY: Makelocal.mk .PHONY: Makelocal.mk
.PHONY: $(PATH_MSXBUILD)/msxbuild-prolog.mk
.PHONY: $(PATH_MSXBUILD)/msxbuild.mk .PHONY: $(PATH_MSXBUILD)/msxbuild.mk
Makefile:: Makelocal.mk Makefile:: Makelocal.mk
Makefile:: $(PATH_MSXBUILD)/msxbuild-prolog.mk
Makefile:: $(PATH_MSXBUILD)/msxbuild.mk Makefile:: $(PATH_MSXBUILD)/msxbuild.mk
@@include-root:: Makefile @@include-root:: Makefile

141
lib/make/mb_env.mk Normal file
View file

@ -0,0 +1,141 @@
MB_ENV ?= on
$(call mb_make_call,mb_doc_variable,MB_ENV,"Enables VERBOSE and DEBUG variable parsing.")
#
# Configure verbose mode
#
ifeq ("$(MB_ENV)", "on")
ifdef VERBOSE
ifeq ("$(VERBOSE)", "off")
.SILENT:
endif
endif
ifdef うるさい
ifeq ("$(うるさい)", "ユニット")
.SILENT:
endif
endif
ifdef LUIDRUCHTIG
ifeq ("$(LUIDRUCHTIG)", "uit")
.SILENT:
endif
endif
ifdef VERBOSA
ifeq ("$(VERBOSA)", "traje")
.SILENT:
endif
endif
ifdef VERBOSO
ifeq ("$(VERBOSO)", "traje")
.SILENT:
endif
endif
ifdef VERBEUSE
ifeq ("$(VERBEUSE)", "dehors")
.SILENT:
endif
endif
ifdef VERBEUX
ifeq ("$(VERBEUX)", "dehors")
.SILENT:
endif
endif
ifdef шумный
ifeq ("$(шумный)", "вне")
.SILENT:
endif
endif
ifdef 吵雜
ifeq ("$(吵雜)", "出去")
.SILENT:
endif
endif
ifdef वाचाल
ifeq ("$(वाचाल)", "बंद")
.SILENT:
endif
endif
ifdef ᕗᕉᑉᕉᔅ
ifeq ("$(ᕗᕉᑉᕉᔅ)", "ᖃᒥᓪᓗᒍ")
.SILENT:
endif
endif
ifndef VERBOSE
ifndef うるさい
ifndef LUIDRUCHTIG
ifndef VERBOSA
ifndef VERBOSO
ifndef VERBEUSE
ifndef VERBEUX
ifndef шумный
ifndef 吵雜
ifndef वाचाल
ifndef ᕗᕉᑉᕉᔅ
.SILENT:
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
#
# Configure debug mode
#
ifeq ("$(MB_ENV)", "on")
ifdef DEBUG
ifneq ("$(DEBUG)", "off")
MB_MAKE_CALL_DEBUG := $(DEBUG)
endif
endif
ifdef ONTBEESTEN
ifneq ("$(ONTBEESTEN)", "uit")
MB_MAKE_CALL_DEBUG := $(ONTBEESTEN)
endif
endif
ifdef デバッグ
ifneq ("$(デバッグ)", "ユニット")
MB_MAKE_CALL_DEBUG := $(デバッグ)
endif
endif
ifdef DEPURAR
ifneq ("$(DEPURAR)", "traje")
MB_MAKE_CALL_DEBUG := $(DEPURAR)
endif
endif
ifdef DÉBOGUER
ifneq ("$(DÉBOGUER)", "dehors")
MB_MAKE_CALL_DEBUG := $(DÉBOGUER)
endif
endif
ifdef отлаживать
ifneq ("$(отлаживать)", "вне")
MB_MAKE_CALL_DEBUG := $(отлаживать)
endif
endif
ifdef 偵錯
ifneq ("$(偵錯)", "出去")
MB_MAKE_CALL_DEBUG := $(偵錯)
endif
endif
ifdef डिबग
ifneq ("$(डिबग)", "बंद")
MB_MAKE_CALL_DEBUG := $(डिबग)
endif
endif
ifdef ᐃᕿᒡᒐᖅᑐᖅ
ifneq ("$(ᐃᕿᒡᒐᖅᑐᖅ)", "ᖃᒥᓪᓗᒍ")
MB_MAKE_CALL_DEBUG := $(ᐃᕿᒡᒐᖅᑐᖅ)
endif
endif
endif

View file

@ -1,154 +0,0 @@
#
# Mandatory prolog to included before msxbuild.mk
#
#
# Make make, make behave.
#
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-builtin-variables
MAKEFLAGS += --warn-undefined-variables
.DELETE_ON_ERROR :=
.RECIPEPREFIX := $(if $(.RECIPEPREFIX),$(.RECIPEPREFIX),>)
.SUFFIXES :=
.ONESHELL :=
.SHELLFLAGS := -e -u -o pipefail -c
SHELL := bash
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This version of make does not support dynamic white space brain fuck mode.)
endif
# === Below here is optional ===
#
# Configure verbose mode
#
ifdef VERBOSE
ifeq ("$(VERBOSE)", "off")
.SILENT:
endif
endif
ifdef
ifeq ("$(うるさい)", "ユニット")
.SILENT:
endif
endif
ifdef LUIDRUCHTIG
ifeq ("$(LUIDRUCHTIG)", "uit")
.SILENT:
endif
endif
ifdef VERBOSA
ifeq ("$(VERBOSA)", "traje")
.SILENT:
endif
endif
ifdef VERBOSO
ifeq ("$(VERBOSO)", "traje")
.SILENT:
endif
endif
ifdef VERBEUSE
ifeq ("$(VERBEUSE)", "dehors")
.SILENT:
endif
endif
ifdef VERBEUX
ifeq ("$(VERBEUX)", "dehors")
.SILENT:
endif
endif
ifdef шумный
ifeq ("$(шумный)", "вне")
.SILENT:
endif
endif
ifdef
ifeq ("$(吵雜)", "出去")
.SILENT:
endif
endif
ifdef
ifeq ("$(वाचाल)", "बंद")
.SILENT:
endif
endif
ifdef
ifeq ("$(ᕗᕉᑉᕉᔅ)", "ᖃᒥᓪᓗᒍ")
.SILENT:
endif
endif
ifndef VERBOSE
ifndef うるさい
ifndef LUIDRUCHTIG
ifndef VERBOSA
ifndef VERBOSO
ifndef VERBEUSE
ifndef VERBEUX
ifndef шумный
ifndef 吵雜
ifndef वाचाल
ifndef ᕗᕉᑉᕉᔅ
.SILENT:
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
endif
#
# Configure debug mode
#
ifdef DEBUG
ifneq ("$(DEBUG)", "off")
MB_MAKE_CALL_DEBUG ?= $(DEBUG)
endif
endif
ifdef ONTBEESTEN
ifneq ("$(ONTBEESTEN)", "uit")
MB_MAKE_CALL_DEBUG ?= $(ONTBEESTEN)
endif
endif
ifdef
ifneq ("$(デバッグ)", "ユニット")
MB_MAKE_CALL_DEBUG ?= $(デバッグ)
endif
endif
ifdef DEPURAR
ifneq ("$(DEPURAR)", "traje")
MB_MAKE_CALL_DEBUG ?= $(DEPURAR)
endif
endif
ifdef DÉBOGUER
ifneq ("$(DÉBOGUER)", "dehors")
MB_MAKE_CALL_DEBUG ?= $(DÉBOGUER)
endif
endif
ifdef отлаживать
ifneq ("$(отлаживать)", "вне")
MB_MAKE_CALL_DEBUG ?= $(отлаживать)
endif
endif
ifdef
ifneq ("$(偵錯)", "出去")
MB_MAKE_CALL_DEBUG ?= $(偵錯)
endif
endif
ifdef ि
ifneq ("$(डिबग)", "बंद")
MB_MAKE_CALL_DEBUG ?= $(डिबग)
endif
endif
ifdef
ifneq ("$(ᐃᕿᒡᒐᖅᑐᖅ)", "ᖃᒥᓪᓗᒍ")
MB_MAKE_CALL_DEBUG ?= $(ᐃᕿᒡᒐᖅᑐᖅ)
endif
endif

View file

@ -1,6 +1,21 @@
# #
# msxbuild.mk - Makefile helper to use with msx projects. # msxbuild.mk - Makefile helper to use with msx projects.
# #
# Make make, make behave;
MAKEFLAGS += --no-builtin-rules
MAKEFLAGS += --no-builtin-variables
MAKEFLAGS += --warn-undefined-variables
.DELETE_ON_ERROR :=
.RECIPEPREFIX := $(if $(.RECIPEPREFIX),$(.RECIPEPREFIX),>)
.SUFFIXES :=
.ONESHELL :=
.SHELLFLAGS := -e -u -o pipefail -c
SHELL := bash
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This version of make does not support dynamic white space brain fuck mode.)
endif
# Set some root variable to use in this library
MB_@RECIPE := ] MB_@RECIPE := ]
MB_@RECIPEPREFIX := $(.RECIPEPREFIX) MB_@RECIPEPREFIX := $(.RECIPEPREFIX)
MB_@BASEPATH := $(dir $(lastword $(MAKEFILE_LIST))) MB_@BASEPATH := $(dir $(lastword $(MAKEFILE_LIST)))
@ -46,6 +61,7 @@ $(eval $(call __mb_include,make/𓃬 𓍄 𓋹𓀭/mb_flow_sdcc.mk))
$(eval $(call __mb_include,make/𓃬 𓍄 𓋹𓀭/mb_flow_clone.mk)) $(eval $(call __mb_include,make/𓃬 𓍄 𓋹𓀭/mb_flow_clone.mk))
@@include-libs:: $(MB_@INCLUDE_CHAIN) @@include-libs:: $(MB_@INCLUDE_CHAIN)
MB_@INCLUDE_CHAIN := MB_@INCLUDE_CHAIN :=
$(eval $(call __mb_include,make/mb_env.mk))
$(eval $(call __mb_include,make/mb_flight.mk)) $(eval $(call __mb_include,make/mb_flight.mk))
$(eval $(call __mb_include,make/i18n/mb_i18n.mk)) $(eval $(call __mb_include,make/i18n/mb_i18n.mk))
ifneq ("$(MB_I18N)", "off") ifneq ("$(MB_I18N)", "off")