Skip to content

Commit

Permalink
Ensure Configure.pl uses gmake for builds on BSDs
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaiepi committed Dec 23, 2017
1 parent a04c616 commit 4f86567
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Configure.pl
Expand Up @@ -17,6 +17,7 @@
my $lclang = lc $lang;
my $uclang = uc $lang;
my $win = $^O eq 'MSWin32';
my $unix = is_OS_type_Unix();
my $slash = $win ? '\\' : '/';
# We don't use ExtUtils::Command in Configure.pl, but it is used in the Makefile
# Try `use`ing it here so users know if they need to install this module
Expand Down Expand Up @@ -148,11 +149,13 @@
$config{'runner_suffix'} = $win ? '.bat' : '';

my $make = 'make';
if ($^O eq 'solaris') {
if (not -X '/usr/bin/gmake') {
die "gmake is required to compile rakudo. Please install by 'pkg install gnu-make'";
if ($unix) {
my $has_make = 0 == system('make --version >/dev/null 2>&1');
unless ($has_make) {
my $has_gmake = 0 == system('gmake --version >/dev/null 2>&1');
die "gmake is required to compile rakudo. Please install it with your operating system's package manager or from source." unless $has_gmake;
$make = 'gmake';
}
$make = 'gmake';
}

if ($win) {
Expand Down Expand Up @@ -189,7 +192,7 @@

print $MAKEFILE "\n# Makefile code generated by Configure.pl:\n";

if ( is_OS_type_Unix() ) {
if ($unix) {
$config{mkpath} = 'mkdir -p --';
$config{chmod} = 'chmod --';
$config{cp} = 'cp --';
Expand Down

0 comments on commit 4f86567

Please sign in to comment.