Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Try to get --gen-moar working.
  • Loading branch information
jnthn committed Mar 15, 2014
1 parent ee1d52e commit db73a21
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Configure.pl
Expand Up @@ -32,7 +32,7 @@

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@',
Expand Down Expand Up @@ -88,21 +88,25 @@
}
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;
$default_backend ||= $b;
}
}
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
Expand Down
5 changes: 5 additions & 0 deletions tools/lib/NQP/Configure.pm
Expand Up @@ -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";
Expand Down

0 comments on commit db73a21

Please sign in to comment.