diff --git a/R/utils.R b/R/utils.R index f05a61ace..4d118ccb1 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 (os_is_windows() && !os_is_wsl() && (Sys.getenv("CMDSTANR_USE_RTOOLS") == "")) { + if (Sys.getenv("MAKE") != "") { + Sys.getenv("MAKE") + } else if (os_is_windows() && !os_is_wsl() && (Sys.getenv("CMDSTANR_USE_RTOOLS") == "")) { "mingw32-make.exe" } else { "make"