Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add automatic STD submodule logic

Idea stolen from Rakudo/Parrot.  'make' will automatically download and build
a known working version of the STD subsystem.
  • Loading branch information...
commit 3b9d4f5cfc2a74bce6e78117ab7e1304b008a6cb 1 parent b97bc5c
Stefan O'Rear authored
View
3  .gitignore
@@ -7,3 +7,6 @@ setting_ast.store
*.swp
*.pmc
syml
+.STD_build_stamp
+.STD_checkout_stamp
+STD_checkout
View
13 CompilerDriver.pm
@@ -10,17 +10,8 @@ use Sub::Exporter -setup => {
open ::NIECZA_OUT, ">&", \*STDOUT;
BEGIN {
- use File::Slurp;
- GETBASE: {
- for (read_file 'Makefile') {
- if (/^STDBASE=(.*)/) {
- unshift @INC, $1;
- $ENV{PERL6LIB} = "$1:$1/lib";
- last GETBASE;
- }
- }
- die "Cannot scrape STDBASE from Makefile";
- }
+ unshift @INC, 'STD_checkout';
+ $ENV{PERL6LIB} = "STD_checkout:STD_checkout/lib";
}
use Body ();
View
16 Makefile
@@ -1,8 +1,8 @@
-STDBASE=/usr/local/src/pugs/src/perl6
+STDBASE:=$(shell pwd)/STD_checkout
STDENV=PERL5LIB=$(STDBASE) PERL6LIB=$(STDBASE):$(STDBASE)/lib
COMPILER=Body.pm CodeGen.pm CompilerDriver.pm Decl.pm Op.pm Sig.pm Unit.pm\
- Niecza/Actions.pm Niecza/Grammar.pmc
+ Niecza/Actions.pm Niecza/Grammar.pmc .STD_build_stamp
test: $(COMPILER) test.pl Setting.dll
perl -MFile::Slurp -MCompilerDriver=:all -e 'header; mainline(scalar read_file("test.pl")); bootstrap' > Program.cs
@@ -20,3 +20,15 @@ Setting.dll: Kernel.cs Setting.cs
Niecza/Grammar.pmc: Niecza/Grammar.pm6
STD5PREFIX=$(STDBASE)/ $(STDENV) $(STDBASE)/viv -5 -o Niecza/Grammar.pmc Niecza/Grammar.pm6
+
+.STD_checkout_stamp: STD_REVISION
+ if [ ! -d STD_checkout ]; then \
+ svn checkout http://svn.pugscode.org/pugs/src/perl6@`cat STD_REVISION` STD_checkout; \
+ else \
+ svn update -r`cat STD_REVISION` STD_checkout; \
+ fi
+ touch .STD_checkout_stamp
+
+.STD_build_stamp: .STD_checkout_stamp
+ cd STD_checkout && make && ./tryfile STD.pm6
+ touch .STD_build_stamp
View
39 README
@@ -4,7 +4,44 @@ This is 'Niecza', which will eventually be a Perl 6 implementation focusing
on optimization research. It targets the Common Language Runtime (ECMA-335;
implementations are "Mono" and ".NET").
-It's currently very primitive; Hello, World is close to its limits.
+To see the current state of the art, the best documentation is the testsuite,
+C<test.pl>.
+
+=head1 DEPENDENCIES
+
+=over 4
+
+=item *
+
+Mono (2.6.4 recommended)
+
+=item *
+
+GNU make
+
+=item *
+
+Subversion
+
+=item *
+
+Perl 5.10.1 (or 5.10.0 with autodie installed from CPAN) in /usr/local/bin
+
+=item *
+
+Moose, Sub::Exporter, File::Slurp, Term::ReadLine and YAML::XS from CPAN
+
+=back
+
+=head1 USING
+
+ $ ./niecza
+ > say 2 + 2
+ 4
+ > ^D
+ $ ./niecza -e 'say 2 + 2'
+ 4
+ $
=head1 COPYRIGHT AND LICENSE
View
1  STD_REVISION
@@ -0,0 +1 @@
+31617
Please sign in to comment.
Something went wrong with that request. Please try again.