From 29d388a4802d971a3c9e1f6449454082d18c6301 Mon Sep 17 00:00:00 2001 From: jgabry Date: Mon, 18 Nov 2024 15:31:14 -0700 Subject: [PATCH 1/4] update usage of 'make' post CmdStan 2.35 - mingw32-make is no longer required on Windows closes #1035 --- R/utils.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index f05a61ac..4d9b2d0b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -92,8 +92,12 @@ arch_is_aarch64 <- function() { } # Returns the type of make command to use to compile depending on the OS +# First checks if $MAKE is set, otherwise falls back to system-specific default make_cmd <- function() { - if (os_is_windows() && !os_is_wsl() && (Sys.getenv("CMDSTANR_USE_RTOOLS") == "")) { + if (Sys.getenv("MAKE") != "") { + Sys.getenv("MAKE") + } else if ((cmdstan_version() < "2.35.0") && os_is_windows() && !os_is_wsl() && + (Sys.getenv("CMDSTANR_USE_RTOOLS") == "")) { "mingw32-make.exe" } else { "make" From 9c7603eea6429de88ec2b12ac65e915b052fb1b5 Mon Sep 17 00:00:00 2001 From: jgabry Date: Mon, 18 Nov 2024 15:41:34 -0700 Subject: [PATCH 2/4] don't check Sys.getenv("MAKE") first (debugging GHA) --- R/utils.R | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/R/utils.R b/R/utils.R index 4d9b2d0b..b62ab62a 100644 --- a/R/utils.R +++ b/R/utils.R @@ -92,11 +92,8 @@ arch_is_aarch64 <- function() { } # Returns the type of make command to use to compile depending on the OS -# First checks if $MAKE is set, otherwise falls back to system-specific default make_cmd <- function() { - if (Sys.getenv("MAKE") != "") { - Sys.getenv("MAKE") - } else if ((cmdstan_version() < "2.35.0") && os_is_windows() && !os_is_wsl() && + if ((cmdstan_version() < "2.35.0") && os_is_windows() && !os_is_wsl() && (Sys.getenv("CMDSTANR_USE_RTOOLS") == "")) { "mingw32-make.exe" } else { From 381be13dd54d436cb6de201a8a129857a062cf51 Mon Sep 17 00:00:00 2001 From: jgabry Date: Wed, 20 Nov 2024 13:36:58 -0700 Subject: [PATCH 3/4] Revert "don't check Sys.getenv("MAKE") first (debugging GHA)" This reverts commit 9c7603eea6429de88ec2b12ac65e915b052fb1b5. --- R/utils.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index b62ab62a..4d9b2d0b 100644 --- a/R/utils.R +++ b/R/utils.R @@ -92,8 +92,11 @@ arch_is_aarch64 <- function() { } # Returns the type of make command to use to compile depending on the OS +# First checks if $MAKE is set, otherwise falls back to system-specific default make_cmd <- function() { - if ((cmdstan_version() < "2.35.0") && os_is_windows() && !os_is_wsl() && + if (Sys.getenv("MAKE") != "") { + Sys.getenv("MAKE") + } else if ((cmdstan_version() < "2.35.0") && os_is_windows() && !os_is_wsl() && (Sys.getenv("CMDSTANR_USE_RTOOLS") == "")) { "mingw32-make.exe" } else { From 73a1cb2cc8b47d096fbd91b5b3fce01b63d9e144 Mon Sep 17 00:00:00 2001 From: jgabry Date: Wed, 20 Nov 2024 14:31:55 -0700 Subject: [PATCH 4/4] don't check CmdStan version when selecting `make` command --- R/utils.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/R/utils.R b/R/utils.R index 4d9b2d0b..4d118ccb 100644 --- a/R/utils.R +++ b/R/utils.R @@ -96,8 +96,7 @@ arch_is_aarch64 <- function() { make_cmd <- function() { if (Sys.getenv("MAKE") != "") { Sys.getenv("MAKE") - } else if ((cmdstan_version() < "2.35.0") && os_is_windows() && !os_is_wsl() && - (Sys.getenv("CMDSTANR_USE_RTOOLS") == "")) { + } else if (os_is_windows() && !os_is_wsl() && (Sys.getenv("CMDSTANR_USE_RTOOLS") == "")) { "mingw32-make.exe" } else { "make"