diff options
author | Moritz Lenz <moritz@faui2k3.org> | 2014-04-01 19:40:30 +0200 |
---|---|---|
committer | Moritz Lenz <moritz@faui2k3.org> | 2014-04-01 19:40:30 +0200 |
commit | a1e13d679c5311fc5cfb9a33a577f52187b4286c (patch) | |
tree | dfaae6c5c392ccf83082b85f6d8cb3bde8f83662 /Configure.pl | |
parent | 6363be3b2438a93af3a19366960c69e23fe6934e (diff) | |
parent | f2236b4d8ff36dd6810ac85f24d69dd22f23933b (diff) |
Merge remote-tracking branch 'origin/tristar'
Conflicts:
tools/build/Makefile.in
tools/star/Makefile
tools/star/release-guide.pod
Diffstat (limited to 'Configure.pl')
-rw-r--r-- | Configure.pl | 47 |
1 files changed, 35 insertions, 12 deletions
diff --git a/Configure.pl b/Configure.pl index 829023c..0611b5f 100644 --- a/Configure.pl +++ b/Configure.pl @@ -1,5 +1,5 @@ #! perl -# Copyright (C) 2009 The Perl Foundation +# Copyright (C) 2009-2014 The Perl Foundation use 5.008; use strict; @@ -32,8 +32,8 @@ MAIN: { my %options; GetOptions(\%options, 'help!', 'prefix=s', - 'backends=s', 'no-clean!', - 'gen-nqp:s', + 'backends=s', 'no-clean!', + 'gen-nqp:s', 'gen-moar:s', 'gen-parrot:s', 'parrot-option=s@', 'parrot-make-option=s@', 'make-install!', 'makefile-timing!', @@ -64,7 +64,7 @@ MAIN: { $options{prefix} ||= 'install'; $options{prefix} = File::Spec->rel2abs($options{prefix}); my $prefix = $options{'prefix'}; - my %known_backends = (parrot => 1, jvm => 1); + my %known_backends = (parrot => 1, jvm => 1, moar => 1); my %letter_to_backend; my $default_backend; for (keys %known_backends) { @@ -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,32 @@ MAIN: { } } unless (%backends) { - $backends{parrot} = 1; + if (defined $options{'gen-moar'}) { + $backends{moar} = 1; + $default_backend = 'moar'; + } + else { + $backends{parrot} = 1; + $default_backend = 'parrot'; + } } } + $config{backend_exes} = join ' ', map + { '$(RAKUDO_DIR)/$(PERL6_' . uc(substr $_, 0, 1) . '_EXE)' } + keys %backends; + $config{backend_modules_install} = join ' ', map + { 'modules-install-' . lc(substr $_, 0, 1) } + keys %backends; + $config{backend_modules_test} = join ' ', map + { 'modules-test-' . lc(substr $_, 0, 1) } + keys %backends; + $config{default_backend_exe} = '$(PERL6_' . + uc(substr $default_backend, 0, 1) . + '_INSTALL)'; + 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 @@ -119,6 +138,7 @@ MAIN: { $config{'stagestats'} = '--stagestats' if $options{'makefile-timing'}; $config{'cpsep'} = $^O eq 'MSWin32' ? ';' : ':'; $config{'shell'} = $^O eq 'MSWin32' ? 'cmd' : 'sh'; + $config{'bat'} = $^O eq 'MSWin32' ? '.bat' : ''; my $make = $config{'make'} = $^O eq 'MSWin32' ? 'nmake' : 'make'; my @prefixes = sort map substr($_, 0, 1), keys %backends; @@ -223,14 +243,17 @@ Configure.pl - $lang Configure General Options: --help Show this text --prefix=dir Install files in dir; also look for executables there - --backends=parrot,jvm Which backend(s) to use + --backends=parrot,jvm,moar + Which backend(s) to use + --gen-moar[=branch] + Download and build a copy of MoarVM --gen-nqp[=branch] Download and build a copy of NQP - --gen-parrot[=branch] + --gen-parrot[=branch] Download and build a copy of Parrot - --parrot-option='--option' + --parrot-option='--option' Options to pass to Parrot's Configure.pl - --parrot-make-option='--option' + --parrot-make-option='--option' Options to pass to Parrot's make, for example: --parrot-make-option='--jobs=4' --makefile-timing Enable timing of individual makefile commands |