diff options
author | jnthn <jnthn@jnthn.net> | 2014-03-15 18:47:53 +0100 |
---|---|---|
committer | jnthn <jnthn@jnthn.net> | 2014-03-15 18:47:53 +0100 |
commit | db73a21ffa2c426e2891297bb6ef53212180569a (patch) | |
tree | d55134358ecf7e56ab4bea8a9a28e1d07f32c955 | |
parent | ee1d52e8c93a2b1a039a8bc19e2c53fee3c0852e (diff) |
Try to get --gen-moar working.
-rw-r--r-- | Configure.pl | 14 | ||||
-rw-r--r-- | tools/lib/NQP/Configure.pm | 5 |
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"; |