diff options
author | Rob Hoelz <rob@hoelz.ro> | 2012-12-19 18:47:44 +0100 |
---|---|---|
committer | Rob Hoelz <rob@hoelz.ro> | 2012-12-19 18:47:44 +0100 |
commit | 428f9a81ce939f76bbf6d973304081e3fc4106de (patch) | |
tree | f1a58981c5a83e12015913b0f9951974d747a8dd | |
parent | 5d804c4e841f410724621bb722af02add93c28ea (diff) |
Set PERL6LIB to destination dir when precompiling
This allows package managers to install modules to a staging
directory with the process blowing up
-rw-r--r-- | tools/build/module-install.pl | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tools/build/module-install.pl b/tools/build/module-install.pl index c5a4deb..6522154 100644 --- a/tools/build/module-install.pl +++ b/tools/build/module-install.pl @@ -69,15 +69,19 @@ sub path_to_module_name { $_; } -print "== Precompiling modules\n"; -chdir 'rakudo'; -foreach my $pm (@pmfiles) { - my $out = $pm; - $out =~ s/\.pm6?$/.pir/; - my @cmd = ($perl6bin, '--target=pir', "--output=$out", $pm); - print join(' ', @cmd), "\n"; - system(@cmd); -} +do { + local $ENV{'PERL6LIB'} = $perl6lib; + + print "== Precompiling modules\n"; + chdir 'rakudo'; + foreach my $pm (@pmfiles) { + my $out = $pm; + $out =~ s/\.pm6?$/.pir/; + my @cmd = ($perl6bin, '--target=pir', "--output=$out", $pm); + print join(' ', @cmd), "\n"; + system(@cmd); + } +}; # According to "Introduction to Algorithms" by Cormen et al., topological |