From: darcagn <da...@us...> - 2023-12-28 18:14:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via a8f88c8315632fe0c7defc76a561f7442ce3f1eb (commit) from 30fa3aaa648db8f6ffaa6e85465663cdd0d2567c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a8f88c8315632fe0c7defc76a561f7442ce3f1eb Author: Colton Pawielski <cep...@us...> Date: Thu Dec 28 12:13:32 2023 -0600 Fix dc-chain host-detect include order (#432) Reverting a change in the include file order made in a9ac6f8. This caused issues with host detection that was required in init.mk ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/Makefile | 7 +++++-- utils/dc-chain/scripts/init.mk | 29 ----------------------------- utils/dc-chain/scripts/utils.mk | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 utils/dc-chain/scripts/utils.mk diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile index 1f79728..2d52f9c 100644 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -20,12 +20,15 @@ else $(error The required $(config_file) file is missing) endif -# Initialization rules -include scripts/init.mk +# Download Functions +include scripts/utils.mk # Detect host machine include scripts/host-detect.mk +# Initialization rules +include scripts/init.mk + # Makefile variables include scripts/variables.mk diff --git a/utils/dc-chain/scripts/init.mk b/utils/dc-chain/scripts/init.mk index 49f12d9..d414586 100644 --- a/utils/dc-chain/scripts/init.mk +++ b/utils/dc-chain/scripts/init.mk @@ -171,32 +171,3 @@ warn_and_fallback = $(if $($(1)),, \ # Fallback to _tarball_type config options if _download_type was not provided packages = gdb $(foreach package, $(packages), $(eval $(call warn_and_fallback,$(package)_download_type,$(package)_tarball_type))) - -# Web downloaders command-lines -downloaders = curl wget -wget_cmd = wget -c $(if $(2),-O $(2)) '$(1)' -curl_cmd = curl --fail --location -C - $(if $(2),-o $(2),-O) '$(1)' - -ifneq ($(force_downloader),) -# Check if specified downloader is in supported list - web_downloader = $(if $(filter $(downloaders),$(force_downloader)),$(force_downloader)) -else -# If no downloader specified, check to see if any are detected - web_downloader = $(if $(shell command -v curl),curl,$(if $(shell command -v wget),wget)) -endif - -# Make sure valid downloader was found -ifeq ($(web_downloader),) - ifeq ($(force_downloader),) - $(error No supported downloader was found ($(downloaders))) - else - $(error Unsupported downloader ($(force_downloader)), select from ($(downloaders))) - endif -endif - -$(info Using $(web_downloader) as download tool) -# Function to call downloader -# Args: -# 1 - URL -# 2 - Output File (Optional) -web_download = $(call $(web_downloader)_cmd,$(1),$(2)) diff --git a/utils/dc-chain/scripts/utils.mk b/utils/dc-chain/scripts/utils.mk new file mode 100644 index 0000000..0c2fa4c --- /dev/null +++ b/utils/dc-chain/scripts/utils.mk @@ -0,0 +1,34 @@ +# Sega Dreamcast Toolchains Maker (dc-chain) +# This file is part of KallistiOS. +# +# Added by Colton Pawielski (2023) +# + +# Web downloaders command-lines +downloaders = curl wget +wget_cmd = wget -c $(if $(2),-O $(2)) '$(1)' +curl_cmd = curl --fail --location -C - $(if $(2),-o $(2),-O) '$(1)' + +ifneq ($(force_downloader),) +# Check if specified downloader is in supported list + web_downloader = $(if $(filter $(downloaders),$(force_downloader)),$(force_downloader)) +else +# If no downloader specified, check to see if any are detected + web_downloader = $(if $(shell command -v curl),curl,$(if $(shell command -v wget),wget)) +endif + +# Make sure valid downloader was found +ifeq ($(web_downloader),) + ifeq ($(force_downloader),) + $(error No supported downloader was found ($(downloaders))) + else + $(error Unsupported downloader ($(force_downloader)), select from ($(downloaders))) + endif +endif + +$(info Using $(web_downloader) as download tool) +# Function to call downloader +# Args: +# 1 - URL +# 2 - Output File (Optional) +web_download = $(call $(web_downloader)_cmd,$(1),$(2)) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |