aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Lenz <moritz@faui2k3.org>2014-04-01 19:40:30 +0200
committerMoritz Lenz <moritz@faui2k3.org>2014-04-01 19:40:30 +0200
commita1e13d679c5311fc5cfb9a33a577f52187b4286c (patch)
treedfaae6c5c392ccf83082b85f6d8cb3bde8f83662
parent6363be3b2438a93af3a19366960c69e23fe6934e (diff)
parentf2236b4d8ff36dd6810ac85f24d69dd22f23933b (diff)
Merge remote-tracking branch 'origin/tristar'
Conflicts: tools/build/Makefile.in tools/star/Makefile tools/star/release-guide.pod
-rw-r--r--.gitignore1
-rw-r--r--Configure.pl47
-rw-r--r--README.star4
m---------modules/Perl6-MIME-Base640
-rw-r--r--tools/build/Makefile.in95
-rw-r--r--tools/build/bin-install.pl10
-rw-r--r--tools/build/module-install.pl10
-rw-r--r--tools/lib/NQP/Configure.pm17
-rw-r--r--tools/star/Makefile16
-rw-r--r--tools/star/release-guide.pod12
10 files changed, 157 insertions, 55 deletions
diff --git a/.gitignore b/.gitignore
index 8bc840c..da75ed3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
MANIFEST
rakudo
nqp
+MoarVM
parrot
src
config.status
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
diff --git a/README.star b/README.star
index 66248bb..b03f21e 100644
--- a/README.star
+++ b/README.star
@@ -5,8 +5,8 @@ This git repository isn't the distribution itself; the repository
contains the tools and scripts used to create a distribution.
If you're looking to simply download and run the latest release
-of Rakudo Star, please download a .tar.gz file from
-http://github.com/rakudo/star/downloads .
+of Rakudo Star, please download a .tar.gz or .msi file from
+http://rakudo.org/downloads/star/.
If you're still reading this, we assume you're a Rakudo Star
release manager, or someone that is looking to create new
diff --git a/modules/Perl6-MIME-Base64 b/modules/Perl6-MIME-Base64
-Subproject 76fd9decc7c1445390b0ab5a1296e9d244f8e1f
+Subproject 9c39b28b4882dffe2c7fb8989aab7fcea3cc953
diff --git a/tools/build/Makefile.in b/tools/build/Makefile.in
index 540e9dd..e4352a6 100644
--- a/tools/build/Makefile.in
+++ b/tools/build/Makefile.in
@@ -1,60 +1,107 @@
# Copyright (C) 2006-2014, The Perl Foundation.
# $Id$
-PARROT_DIR = parrot
-NQP_DIR = nqp
-RAKUDO_DIR = rakudo
+PARROT_DIR = parrot
+MOAR_DIR = moarvm
+NQP_DIR = nqp
+RAKUDO_DIR = rakudo
STAR_VERSION = 2014.03
-# values from parrot_config
+# install location
PREFIX_DIR = @prefix@
+
+# values from parrot_config
PARROT_BIN_DIR = @bindir@
PARROT_VERSION = @versiondir@
PARROT_LIB_DIR = @libdir@$(PARROT_VERSION)
+# JVM install location
+JVM_BIN_DIR = $(PREFIX_DIR)/bin
+
+# MoarVM install location
+MOAR_BIN_DIR = $(PREFIX_DIR)/bin
+
EXE = @exe@
+BAT = @bat@
PERL = @perl@
CP = $(PERL) -MExtUtils::Command -e cp
RM_F = $(PERL) -MExtUtils::Command -e rm_f
MKPATH = $(PERL) -MExtUtils::Command -e mkpath
CHMOD = $(PERL) -MExtUtils::Command -e chmod
-# locations of parrot resources
-PARROT_EXE = $(PARROT_BIN_DIR)/parrot$(EXE)
-P_NQP_EXE = $(PARROT_BIN_DIR)/nqp-p$(EXE)
-PBC_TO_EXE = $(PARROT_BIN_DIR)/pbc_to_exe$(EXE)
+PERL6_P_EXE = perl6-p$(EXE)
+PERL6_P_LANG_DIR = $(PARROT_LIB_DIR)/languages/perl6
+PERL6_P_INSTALL = $(PARROT_BIN_DIR)/$(PERL6_P_EXE)
-PERL6_EXE = perl6-p$(EXE)
-PERL6_LANG_DIR = $(PARROT_LIB_DIR)/languages/perl6
-PERL6_INSTALL = $(PARROT_BIN_DIR)/$(PERL6_EXE)
+PERL6_J_EXE = perl6-j$(BAT)
+PERL6_J_LANG_DIR = $(PREFIX_DIR)/languages/perl6
+PERL6_J_INSTALL = $(JVM_BIN_DIR)/$(PERL6_J_EXE)
+PERL6_M_EXE = perl6-m$(BAT)
+PERL6_M_LANG_DIR = $(PREFIX_DIR)/languages/perl6
+PERL6_M_INSTALL = $(MOAR_BIN_DIR)/$(PERL6_M_EXE)
+
+PERL6_EXE = perl6$(EXE)
+
+<<<<<<< HEAD
+=======
MODULES = modules/MODULES.txt
+>>>>>>> origin/tristar
all: rakudo
-rakudo: $(RAKUDO_DIR)/$(PERL6_EXE)
-$(RAKUDO_DIR)/$(PERL6_EXE):
+rakudo: @backend_exes@
+
+@backend_exes@:
@echo "== Configuring and building Rakudo"
cd $(RAKUDO_DIR) && $(PERL) Configure.pl --prefix=$(PREFIX_DIR) && $(MAKE)
+
rakudo-test: rakudo
cd $(RAKUDO_DIR) && $(MAKE) test
+
rakudo-spectest: rakudo
cd $(RAKUDO_DIR) && $(MAKE) spectest
+
rakudo-install: rakudo
cd $(RAKUDO_DIR) && $(MAKE) install
- @win32_libparrot_copy@
- $(CP) $(DESTDIR)$(PERL6_INSTALL) $(PERL6_EXE)
+ $(CP) $(DESTDIR)@default_backend_exe@ $(PERL6_EXE)
$(CHMOD) 755 $(PERL6_EXE)
+ @win32_libparrot_copy@
+
+modules-install: @backend_modules_install@
+
+modules-install-p:
+ @echo "== Installing modules for Parrot"
+ $(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_P_INSTALL) $(DESTDIR)$(PERL6_P_LANG_DIR)/lib pir pir $(MODULES)
+ @echo "== Installing binaries for Parrot"
+ $(PERL) tools/build/bin-install.pl $(PERL6_P_INSTALL) $(DESTDIR)$(PARROT_BIN_DIR) p modules/ufo/bin/ufo modules/panda/bin/panda modules/doc/bin/p6doc
-modules-install: rakudo-install
- @echo "== Installing modules"
- $(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_INSTALL) $(DESTDIR)$(PERL6_LANG_DIR)/lib $(MODULES)
- @echo "== Installing binaries"
- $(PERL) tools/build/bin-install.pl $(PERL6_INSTALL) $(DESTDIR)$(PARROT_BIN_DIR) modules/ufo/bin/ufo modules/panda/bin/panda modules/doc/bin/p6doc
+<<<<<<< HEAD
+=======
+modules-install-j:
+ @echo "== Installing modules for JVM"
+ $(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_J_INSTALL) $(DESTDIR)$(PERL6_J_LANG_DIR)/lib jar jar $(MODULES)
+ @echo "== Installing binaries for JVM"
+ $(PERL) tools/build/bin-install.pl $(PERL6_J_INSTALL) $(DESTDIR)$(JVM_BIN_DIR) j modules/ufo/bin/ufo modules/panda/bin/panda modules/doc/bin/p6doc
-modules-test:
- $(PERL) tools/build/modules-test.pl $(CURDIR) $(DESTDIR)$(PERL6_INSTALL) modules/MODULES.txt
+modules-install-m:
+ @echo "== Installing modules for MoarVM"
+ $(PERL) tools/build/module-install.pl $(DESTDIR)$(PERL6_M_INSTALL) $(DESTDIR)$(PERL6_M_LANG_DIR)/lib moarvm mbc $(MODULES)
+ @echo "== Installing binaries for MoarVM"
+ $(PERL) tools/build/bin-install.pl $(PERL6_M_INSTALL) $(DESTDIR)$(MOAR_BIN_DIR) m modules/ufo/bin/ufo modules/panda/bin/panda modules/doc/bin/p6doc
+modules-test: @backend_modules_test@
+
+modules-test-p:
+ $(PERL) tools/build/modules-test.pl $(CURDIR) $(DESTDIR)$(PERL6_P_INSTALL) modules/MODULES.txt
+
+modules-test-j:
+ $(PERL) tools/build/modules-test.pl $(CURDIR) $(DESTDIR)$(PERL6_J_INSTALL) modules/MODULES.txt
+
+modules-test-m:
+ $(PERL) tools/build/modules-test.pl $(CURDIR) $(DESTDIR)$(PERL6_M_INSTALL) modules/MODULES.txt
+
+>>>>>>> origin/tristar
install: rakudo-install modules-install
test:
@@ -62,7 +109,7 @@ test:
@echo "To run the Rakudo compiler tests, use '$(MAKE) rakudo-test'"
@echo "To run the Perl 6 spectests, use '$(MAKE) rakudo-spectest'"
@echo ""
- @echo "To run tests for individual modules, try:"
+ @echo "To run tests for individual modules, install and then try:"
@echo " prove -e ./perl6 -r modules/<name>/t"
@echo ""
@@ -111,8 +158,6 @@ help:
config:
$(PERL) Configure.pl
-$(PARROT_EXE):
-
CRITIC_FILES=Configure.pl tools/build/
perlcritic:
diff --git a/tools/build/bin-install.pl b/tools/build/bin-install.pl
index 1c71cea..1b47942 100644
--- a/tools/build/bin-install.pl
+++ b/tools/build/bin-install.pl
@@ -4,7 +4,7 @@ use strict;
use warnings;
use File::Spec;
-my ($p6bin, $dest, @files) = @ARGV;
+my ($p6bin, $dest, $post, @files) = @ARGV;
die "Usage: $0 <perl6_binary> <destination_path> <source_files>"
unless $p6bin && $dest;
@@ -25,4 +25,12 @@ for my $filename (@files) {
close $OUT or die "Error while closing file '$dest/$basename': $!";
close $IN;
chmod 0755, "$dest/$basename";
+ open my $ALIAS, '>', "$dest/$basename-$post"
+ or die "Cannot write file '$dest/$basename-$post' for installing it: $!";
+ printf { $ALIAS } <<'EOA', $p6bin, $dest, $basename;
+#!/bin/sh
+exec %s %s/%s "$@"
+EOA
+ close $ALIAS or die "Error while closing file '$dest/$basename-$post': $!";
+ chmod 0755, "$dest/$basename-$post";
}
diff --git a/tools/build/module-install.pl b/tools/build/module-install.pl
index 2ed2589..b6be9c7 100644
--- a/tools/build/module-install.pl
+++ b/tools/build/module-install.pl
@@ -9,6 +9,8 @@ use File::Basename;
my $perl6bin = shift @ARGV;
my $perl6lib = shift @ARGV;
+my $compext = shift @ARGV;
+my $comptarget = shift @ARGV;
my @pmfiles;
my @mod_pms;
@@ -22,14 +24,14 @@ while (<>) {
find({ no_chdir=>1, wanted => \&libcopy }, $mlib);
sub libcopy {
- return unless /\.pm6?|\.pod/;
+ return unless /\.pm6?$|\.pod$/;
my $source = $File::Find::name;
my $target = $source;
$target =~ s/\Q$mlib\E/$perl6lib/;
print "$source => $target\n";
mkpath dirname($target);
copy($source, $target) or die "copy failed: $!\n";
- push @mod_pms, $target if $target =~ /\.pm6?/;
+ push @mod_pms, $target if $target =~ /\.pm6?$/;
}
my %usages_of;
@@ -76,8 +78,8 @@ do {
chdir 'rakudo';
foreach my $pm (@pmfiles) {
my $out = $pm;
- $out =~ s/\.pm6?$/.pir/;
- my @cmd = ($perl6bin, '--target=pir', "--output=$out", $pm);
+ $out =~ s/\.pm6?$/.$compext/;
+ my @cmd = ($perl6bin, "--target=$comptarget", "--output=$out", $pm);
print join(' ', @cmd), "\n";
system(@cmd);
}
diff --git a/tools/lib/NQP/Configure.pm b/tools/lib/NQP/Configure.pm
index 641d2c6..cb95cc9 100644
--- a/tools/lib/NQP/Configure.pm
+++ b/tools/lib/NQP/Configure.pm
@@ -274,11 +274,13 @@ sub gen_nqp {
my $backends = $options{'backends'};
my $gen_nqp = $options{'gen-nqp'};
+ my $gen_moar = $options{'gen-moar'};
my $gen_parrot = $options{'gen-parrot'};
my $prefix = $options{'prefix'} || cwd().'/install';
my $startdir = cwd();
my $PARROT_REVISION = 'nqp/tools/build/PARROT_REVISION';
+ my $MOAR_REVISION = 'nqp/tools/build/MOAR_REVISION';
my (%impls, %need);
@@ -321,7 +323,7 @@ sub gen_nqp {
return %impls unless %need;
- if (defined $gen_nqp || defined $gen_parrot) {
+ if (defined $gen_nqp || defined $gen_parrot || defined $gen_moar) {
git_checkout($nqp_git, 'nqp', $nqp_want, $nqp_push);
}
@@ -333,11 +335,18 @@ sub gen_nqp {
$impls{parrot}{config} = \%c;
}
- return %impls unless defined($gen_nqp) || defined($gen_parrot);
+ if ($need{moar} && defined $gen_moar) {
+ my ($moar_want) = split(' ', slurp($MOAR_REVISION));
+ my $moar = gen_moar($moar_want, %options, prefix => $prefix);
+ $impls{moar}{bin} = "$prefix/bin/nqp-m$bat";
+ }
+
+ return %impls unless defined($gen_nqp) || defined($gen_parrot) || defined($gen_moar);
my $backends_to_build = join ',', sort keys %need;
my @cmd = ($^X, 'Configure.pl', "--prefix=$prefix",
"--backends=$backends", "--make-install");
+
print "Building NQP ...\n";
chdir("$startdir/nqp");
print "@cmd\n";
@@ -425,7 +434,7 @@ sub gen_moar {
my $startdir = cwd();
my $moar_exe = "$prefix/bin/moar$exe";
- my $moar_have = qx{ $moar_exe --version };
+ my $moar_have = -e $moar_exe ? qx{ $moar_exe --version } : undef;
if ($moar_have) {
$moar_have = $moar_have =~ /version (\S+)/ ? $1 : undef;
}
@@ -443,7 +452,7 @@ sub gen_moar {
my $moar_repo = git_checkout($moar_git, 'MoarVM', $gen_moar || $moar_want, $moar_push);
- unless (cmp_rev($moar_repo, $moar_want) >= 0) {
+ if (defined($moar_repo) && cmp_rev($moar_repo, $moar_want) < 0) {
die "You asked me to build $gen_moar, but $moar_repo is not new enough to satisfy version $moar_want\n";
}
diff --git a/tools/star/Makefile b/tools/star/Makefile
index e13c2a2..772bfeb 100644
--- a/tools/star/Makefile
+++ b/tools/star/Makefile
@@ -1,6 +1,7 @@
RAKUDO_VER = 2014.03.01
NQP_VER = 2014.03
PARROT_VER = 6.1.0
+MOAR_VER = 2014.03
STAR_REL = rakudo-star-$(VERSION)
STAR_TGZ = $(STAR_REL).tar.gz
@@ -16,12 +17,15 @@ NQP_SRC = $(SRC_DIR)/$(NQP_TGZ)
PARROT_TGZ = parrot-$(PARROT_VER).tar.gz
PARROT_URL = http://ftp.parrot.org/releases/all/$(PARROT_VER)/$(PARROT_TGZ)
PARROT_SRC = $(SRC_DIR)/$(PARROT_TGZ)
+MOAR_TGZ = MoarVM-$(MOAR_VER).tar.gz
+MOAR_URL = http://www.moarvm.org/releases/$(MOAR_TGZ)
+MOAR_SRC = $(SRC_DIR)/$(MOAR_TGZ)
PERL = perl
PREFIX = $(PERL) $(CURDIR)/tools/star/prefix.pl
WGET = wget --no-check-certificate
-all: rakudo nqp parrot manifest
+all: rakudo nqp parrot moar manifest
always:
@@ -32,7 +36,7 @@ $(RAKUDO_SRC):
mkdir -p $(SRC_DIR)
$(WGET) $(RAKUDO_URL) -O $(RAKUDO_SRC)
-nqp: parrot $(NQP_SRC)
+nqp: parrot moar $(NQP_SRC)
tar --xform 's!nqp-[^/]*!nqp!' -xvzf $(NQP_SRC)
$(NQP_SRC):
@@ -46,6 +50,13 @@ $(PARROT_SRC):
mkdir -p $(SRC_DIR)
$(WGET) $(PARROT_URL) -O $(PARROT_SRC)
+moar: $(MOAR_SRC)
+ tar --xform 's!MoarVM-[^/]*!MoarVM!' -xvzf $(MOAR_SRC)
+
+$(MOAR_SRC):
+ mkdir -p $(SRC_DIR)
+ $(WGET) $(MOAR_URL) -O $(MOAR_SRC)
+
modules/zavolaj/lib:
@echo "Updating submodules"
git submodule init
@@ -56,6 +67,7 @@ manifest: modules/zavolaj/lib
git ls-files >>MANIFEST
$(PREFIX) rakudo/ rakudo/MANIFEST >>MANIFEST
$(PREFIX) nqp/ nqp/MANIFEST >>MANIFEST
+ $(PREFIX) MoarVM/ MoarVM/MANIFEST >>MANIFEST
cut -d' ' -f1 parrot/MANIFEST | $(PREFIX) parrot/ >>MANIFEST
git submodule foreach --quiet 'git ls-files | $(PREFIX) $$path/' >>MANIFEST
grep -v -f tools/star/MANIFEST.exclude MANIFEST >MANIFEST.1
diff --git a/tools/star/release-guide.pod b/tools/star/release-guide.pod
index c255150..2e77810 100644
--- a/tools/star/release-guide.pod
+++ b/tools/star/release-guide.pod
@@ -11,7 +11,8 @@ are also free to choose older releases of the compiler, NQP, and/or
Parrot. The goal is to balance end-user stability needs with
progress being made on the compiler, modules, and other runtime
components. Currently Star is on a monthly release cycle; we
-expect to slow down to quarterly releases again sometime in 2013.
+expect to slow down to quarterly releases again sometime in the
+future.
=head2 Steps to create a release
@@ -50,12 +51,13 @@ reports a clean repository.
Change to the star repository directory, and edit the first three
lines of tools/star/Makefile to indicate the desired releases of
-Rakudo, NQP, and Parrot to use.
+Rakudo, NQP, MoarVM, and Parrot to use.
Usually that means the last Rakudo release, the NQP version that is in the
-released Rakudo's F<tools/build/NQP_REVISION> file, and the parrot version
-in the F<tools/build/PARROT_REVISION> file that is include in the NQP
-release.
+released Rakudo's F<tools/build/NQP_REVISION> file, the MoarVM version that
+is in the F<tools/build/MOAR_REVISION> file that is included in the NQP
+release, and the Parrot version in the F<tools/build/PARROT_REVISION> file
+that is include in the NQP release.
$ cd star
$ vi tools/star/Makefile