msxbuild/lib/make/天房系統擴展/mb_msxhub.mk
Willem Cazander 66990665fa
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 7s
Converted to make style like "filter-out"
2024-07-16 16:45:37 +02:00

247 lines
14 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

MB_MSXHUB_API ?= https://msxhub.com/api
$(call mb-make-call,mb-doc-variable-deep,MB_MSXHUB_API,"Resource identifier for msxhub package rest api.")
MB_MSXHUB_CACHE ?= $(MB_OS_CACHE)/msxbuild/msxhub
$(call mb-make-call,mb-doc-variable-deep,MB_MSXHUB_CACHE,"Cache storage location.")
define _mb-msxhub-file-fetch
$(MB_   )$(call mb-make-call,mb-os-echo-command,$(MB_I18N_MSXHUB_FILE_FETCH) $(subst $(MB_MSXHUB_API)/,,$(1)))
$(MB_   )$(if $(wildcard $(dir $(MB_MSXHUB_CACHE)/$(subst $(MB_MSXHUB_API)/,,$(1)))),,$(call mb-make-call,mb-os-dir-create,$(dir $(MB_MSXHUB_CACHE)/$(subst $(MB_MSXHUB_API)/,,$(1)))))
$(MB_   )$(if $(wildcard $(MB_MSXHUB_CACHE)/$(subst $(MB_MSXHUB_API)/,,$(1))),,wget -O $(MB_MSXHUB_CACHE)/$(subst $(MB_MSXHUB_API)/,,$(1)) $(1))
endef
# NOTE: with HDD import/export we get duplicate files after openMSX run, so force to lowercase.
define mb-msxhub-file
$(MB_   )$(if $(wildcard $(MB_MSXHUB_CACHE)/$(2)),,$(call mb-make-call,_mb-msxhub-file-fetch,$(MB_MSXHUB_API)/$(2)))
$(MB_   )$(if $(wildcard $(1)/$(call mb-make-call,mb-make-lowercase,$(notdir $(2)))),,$(call mb-make-call,mb-os-file-copy,$(MB_MSXHUB_CACHE)/$(2),$(1)/$(call mb-make-call,mb-make-lowercase,$(notdir $(2)))))
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-file,"Installs msxsub packages from slug into dir.","<dir> <msxhub-slug>")
#
# Operating System (minimal)
#
define mb-msxhub-get-msxdos1-boot
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS1/1.03-2/get/MSXDOS1/MSXDOS.SYS)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS1/1.03-2/get/MSXDOS1/COMMAND.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-msxdos1-boot,"Installs msxdos1 boot files into dir.","<dir>")
define mb-msxhub-get-msxdos2-boot
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/MSXDOS2.SYS)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/COMMAND2.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-msxdos2-boot,"Installs msxdos2 boot files into dir.","<dir>")
define mb-msxhub-get-nextor-boot
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/NEXTOR.SYS)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/COMMAND2.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-nextor-boot,"Installs nextor boot files into dir.","<dir>")
#
# Native OS utils
#
define mb-msxhub-get-msxdos2-utils
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/CHKDSK.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/DISKCOPY.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/FIXDISK.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/UNDEL.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/XCOPY.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/XDIR.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2/2.20-1/get/MSXDOS2/UTILS/KMODE.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-msxdos2-utils,"Installs msxdos2 util files into dir.","<dir>")
define mb-msxhub-get-nextor-utils
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/DELALL.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/DEVINFO.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/DRIVERS.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/DRVINFO.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/FASTOUT.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/LOCK.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/MAPDRV.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/EMUFILE.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/RALLOC.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/Z80MODE.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/NSYSVER.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/NEXBOOT.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),NEXTOR/2.1.0-1/get/NEXTOR/CONCLUS.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-nextor-utils,"Installs nextor util files into dir.","<dir>")
#
# Compilers
#
define mb-msxhub-get-macro80
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MACRO80/2.0-1/get/MACRO80/CREF80.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MACRO80/2.0-1/get/MACRO80/L80.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MACRO80/2.0-1/get/MACRO80/LIB80.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MACRO80/2.0-1/get/MACRO80/M80.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-macro80,"Installs macro80 package into dir.","<dir>")
define mb-msxhub-get-z80asmuk
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/BINTOASM.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/DUMP.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/HEXTOCOM.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/PRL.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/PRNTOSYM.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/RSX.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/ZSM.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/ZSMPP.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),Z80ASMUK/3.4-1/get/Z80ASMUK/HEXTOBIN.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-z80asmuk,"Installs z80asmuk package into dir.","<dir>")
define mb-msxhub-get-wbass2
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),WBASS2/2.0-1/get/WBASS2/zoekram.bin)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),WBASS2/2.0-1/get/WBASS2/wbass2.bin)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),WBASS2/2.0-1/get/WBASS2/wbass2.bas)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-wbass2,"Installs wbass2 package into dir.","<dir>")
define mb-msxhub-get-konpass
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),KONPASS/1.3.0-1/get/KONPASS/KONPASS.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),KONPASS/1.3.0-1/get/KONPASS/KONPASS.DAT)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-konpass,"Installs konpass package into dir.","<dir>")
#
# Compressors
#
define mb-msxhub-get-pmarc
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),PMARC/2.0-1/get/PMARC/PMARC.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),PMARC/2.0-1/get/PMARC/PMCAT.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),PMARC/2.0-1/get/PMARC/PMEXE2.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),PMARC/2.0-1/get/PMARC/PMEXT.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),PMARC/2.0-1/get/PMARC/PMSET.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),PMARC/2.0-1/get/PMARC/PMSFX2.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-pmarc,"Installs pmarc package into dir.","<dir>")
define mb-msxhub-get-lhpack
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),LHPACK/1.00-1/get/LHPACK/lhpack.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-lhpack,"Installs lhpack package into dir.","<dir>")
define mb-msxhub-get-lhext
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),LHEXT/1.34-2/get/LHEXT/lhext.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-lhext,"Installs lhext package into dir.","<dir>")
define mb-msxhub-get-gunzip
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),GUNZIP/1.1-1/get/GUNZIP/gunzip.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-gunzip,"Installs gunzip package into dir.","<dir>")
define mb-msxhub-get-tunzip
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),TUNZIP/0.91-1/get/TUNZIP/tunzip.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-tunzip,"Installs tunzip package into dir.","<dir>")
define mb-msxhub-get-popcom
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),POPCOM/1.00-2/get/POPCOM/popcom.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-popcom,"Installs popcom package into dir.","<dir>")
#
# Tools
#
define mb-msxhub-get-make
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MAKE/2.00-1/get/MAKE/MAKE.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-make,"Installs make package into dir.","<dir>")
define mb-msxhub-get-adir
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),ADIR/1.3-1/get/ADIR/adir.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-adir,"Installs adir package into dir.","<dir>")
define mb-msxhub-get-turbo
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),TURBO/2.1-1/get/TURBO/turbo.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-turbo,"Installs turbo package into dir.","<dir>")
define mb-msxhub-get-baskom
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),BASKOM/1.0-1/get/BASKOM/baskom.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-baskom,"Installs baskom package into dir.","<dir>")
define mb-msxhub-get-binldr
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),BINLDR/1.0.2-1/get/BINLDR/BINLDR.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-binldr,"Installs binldr package into dir.","<dir>")
define mb-msxhub-get-dmphex
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),DMPHEX/1.00-1/get/DMPHEX/dmphex.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-dmphex,"Installs dmphex package into dir.","<dir>")
define mb-msxhub-get-zd
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),ZD/3.30-1/get/ZD/zd.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-zd,"Installs zd package into dir.","<dir>")
define mb-msxhub-get-msxdos2t
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/ADDAUX.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/BEEP.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/BIO.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/BODY.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/BSAVE.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/CAL.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/CALC.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/DUMP.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/EXPAND.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/GREP.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/HEAD.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/KEY.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/LIST.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/LS.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/MENU.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/MORE.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/PATCH.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/SLEEP.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/TAIL.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/TR.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/UNIQ.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/VIEW.COM)
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),MSXDOS2T/1.0-1/get/MSXDOS2T/WC.COM)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-msxdos2t,"Installs msxdos2t package into dir.","<dir>")
#
# Graphics editors
#
define mb-msxhub-get-gfxage
$(MB_   )$(call mb-make-call,mb-msxhub-file,$(1),GFXAGE/0.99-1/get/GFXAGE/gfxage.com)
endef
$(call mb-make-call,mb-doc-function-deep,mb-msxhub-get-gfxage,"Installs gfxage package into dir.","<dir>")