aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2021-03-04 17:44:18 +0100
committerPatrick Spek <p.spek@tyil.nl>2021-03-04 17:44:18 +0100
commit54a1cb01d3cfd3c6df042a514e03dbfa939a6c5d (patch)
tree0adf9c1c2c4a62608ca4990ab70342732c5ff5fa
parentdcc9b10b8187075437c56d334f3c7b412af11a52 (diff)
Use gmake for nqp and rakudo if its available
NQP and Rakudo generate a different makefile if gmake is available, and their makefiles require gmake to be used because of that. This change will check if gmake is available, and use it for those particular core components instead of regular make.
-rw-r--r--lib/actions/install.bash8
-rw-r--r--lib/main.bash11
2 files changed, 15 insertions, 4 deletions
diff --git a/lib/actions/install.bash b/lib/actions/install.bash
index 12292d0..e381d4d 100644
--- a/lib/actions/install.bash
+++ b/lib/actions/install.bash
@@ -190,8 +190,8 @@ build_nqp() {
{
perl Configure.pl --backend="$RSTAR_BACKEND" "$@" \
- && make \
- && make install \
+ && ${RSTAR_PLATFORM[make]} \
+ && ${RSTAR_PLATFORM[make]} install \
|| return
} > "$logfile" 2>&1
}
@@ -211,8 +211,8 @@ build_rakudo() {
{
perl Configure.pl --backend="$RSTAR_BACKEND" "$@" \
- && make \
- && make install \
+ && ${RSTAR_PLATFORM[make]} \
+ && ${RSTAR_PLATFORM[make]} install \
|| return
} > "$logfile" 2>&1
}
diff --git a/lib/main.bash b/lib/main.bash
index 67d05c7..9e9b7ef 100644
--- a/lib/main.bash
+++ b/lib/main.bash
@@ -213,6 +213,7 @@ discover_system() {
RSTAR_PLATFORM["arch"]="$(discover_system_arch)"
RSTAR_PLATFORM["version"]="$(discover_system_version)"
RSTAR_PLATFORM["term"]="$TERM"
+ RSTAR_PLATFORM["make"]="$(discover_system_make)"
# When on a Linux-using OS, check for the specific distribution in use.
if [[ ${RSTAR_PLATFORM[os]} == *"linux"* ]]
@@ -249,6 +250,16 @@ discover_system_distro() {
fi
}
+discover_system_make() {
+ for m in gmake make
+ do
+ command -v "$m" > /dev/null || continue
+
+ printf "%s" "$m"
+ return
+ done
+}
+
discover_system_version() {
printf "%s" "$(uname -r | awk '{print tolower($0)}')"
}