From 428f9a81ce939f76bbf6d973304081e3fc4106de Mon Sep 17 00:00:00 2001 From: Rob Hoelz Date: Wed, 19 Dec 2012 18:47:44 +0100 Subject: Set PERL6LIB to destination dir when precompiling This allows package managers to install modules to a staging directory with the process blowing up --- tools/build/module-install.pl | 22 +++++++++++++--------- 1 file 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 -- cgit v1.1