Skip to content

Commit

Permalink
Revise $*PERL variable a bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmichaud committed Apr 21, 2012
1 parent d7b76d9 commit 5d7626b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2012.04
2012.04 51 Brazos Valley
18 changes: 11 additions & 7 deletions src/core/terms.pm
Expand Up @@ -24,13 +24,17 @@ sub term:<time>() { nqp::p6box_i(pir::time__I()) }
}
nqp::bindkey(pir::get_who__PP(PROCESS), '$VM', $VM);

my $PERL = {};
my Mu $perl := pir::find_caller_lex__PS('$COMPILER_CONFIG');
my Mu $perl_iter := nqp::iterator($perl);
while $perl_iter {
$key = nqp::p6box_s(pir::shift__SP($perl_iter));
$PERL{$key} = nqp::p6box_s(nqp::atkey($perl, nqp::unbox_s($key)));
}
my Mu $compiler := pir::find_caller_lex__PS('$COMPILER_CONFIG');
my $PERL = {
name => 'rakudo',
compiler => {
name => 'rakudo',
ver => nqp::p6box_s(nqp::atkey($compiler, 'version')),
release-number => nqp::p6box_s(nqp::atkey($compiler, 'release-number')),
build-date => nqp::p6box_s(nqp::atkey($compiler, 'build-date')),
codename => nqp::p6box_s(nqp::atkey($compiler, 'codename')),
}
};
nqp::bindkey(pir::get_who__PP(PROCESS), '$PERL', $PERL);

my $CWD = nqp::p6box_s(pir::new__PS('OS').cwd);
Expand Down
14 changes: 9 additions & 5 deletions tools/build/gen-version.pl
Expand Up @@ -11,21 +11,25 @@ =head1 TITLE
open(my $fh, '<', 'VERSION') or die $!;
my $VERSION = <$fh>;
close($fh);
chomp $VERSION;
my ($version, $release, $codename) = split(' ', $VERSION, 3);

if (-d '.git' && open(my $GIT, '-|', "git describe --match '2*'")) {
$VERSION = <$GIT>;
$version = <$GIT>;
close($GIT);
}

chomp $VERSION;
chomp $version;

my $builddate = strftime('%Y-%m-%dT%H:%M:%SZ', gmtime);

print <<"END_VERSION";
sub hll-config(\$config) {
\$config<name> := 'rakudo';
\$config<version> := '$VERSION';
\$config<build-date> := '$builddate';
\$config<name> := 'rakudo';
\$config<version> := '$version';
\$config<release-number> := '$release';
\$config<codename> := '$codename';
\$config<build-date> := '$builddate';
}
END_VERSION

Expand Down

0 comments on commit 5d7626b

Please sign in to comment.