aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Configure.pl14
-rw-r--r--tools/lib/NQP/Configure.pm5
2 files changed, 14 insertions, 5 deletions
diff --git a/Configure.pl b/Configure.pl
index 4840abf..fe665c8 100644
--- a/Configure.pl
+++ b/Configure.pl
@@ -32,7 +32,7 @@ MAIN: {
my %options;
GetOptions(\%options, 'help!', 'prefix=s',
- 'backends=s', 'no-clean!',
+ 'backends=s', 'no-clean!',
'gen-nqp:s', 'gen-moar:s',
'gen-parrot:s', 'parrot-option=s@',
'parrot-make-option=s@',
@@ -88,8 +88,7 @@ MAIN: {
}
else {
for my $l (sort keys %letter_to_backend) {
- # TODO: needs .exe/.bat magic on windows?
- if (-x "$prefix/bin/nqp-$l") {
+ if (-x "$prefix/bin/nqp-$l" || -x "$prefix/bin/nqp-$l.bat" || -x "$prefix/bin/nqp-$l.exe") {
my $b = $letter_to_backend{$l};
print "Found $prefix/bin/nqp-$l (backend $b)\n";
$backends{$b} = 1;
@@ -97,12 +96,17 @@ MAIN: {
}
}
unless (%backends) {
- $backends{parrot} = 1;
+ if (defined $options{'gen-moar'}) {
+ $backends{moar} = 1;
+ }
+ else {
+ $backends{parrot} = 1;
+ }
}
}
unless ($backends{parrot}) {
- warn "JVM-only builds are currently not supported, and might go wrong.\n";
+ warn "JVM/Moar-only builds are currently not supported, and might go wrong.\n";
}
# Save options in config.status
diff --git a/tools/lib/NQP/Configure.pm b/tools/lib/NQP/Configure.pm
index 7e3f15b..0786cd5 100644
--- a/tools/lib/NQP/Configure.pm
+++ b/tools/lib/NQP/Configure.pm
@@ -339,6 +339,11 @@ sub gen_nqp {
my $backends_to_build = join ',', sort keys %need;
my @cmd = ($^X, 'Configure.pl', "--prefix=$prefix",
"--backends=$backends", "--make-install");
+
+ if (defined $gen_moar) {
+ push @cmd, $gen_moar ? "--gen-moar=$gen_moar" : '--gen-moar';
+ }
+
print "Building NQP ...\n";
chdir("$startdir/nqp");
print "@cmd\n";