From ae704363e4b1b2d3a5c5ba6d925f4b1904f314c8 Mon Sep 17 00:00:00 2001 From: Timo Paulssen Date: Mon, 17 Mar 2014 00:52:46 +0100 Subject: baby steps towards tri-module-install. --- tools/build/module-install.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/build/module-install.pl') diff --git a/tools/build/module-install.pl b/tools/build/module-install.pl index 2ed2589..ea22812 100644 --- a/tools/build/module-install.pl +++ b/tools/build/module-install.pl @@ -9,6 +9,7 @@ use File::Basename; my $perl6bin = shift @ARGV; my $perl6lib = shift @ARGV; +my $comptarget = shift @ARGV; my @pmfiles; my @mod_pms; @@ -76,8 +77,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?$/.$comptarget/; + my @cmd = ($perl6bin, "--target=$comptarget", "--output=$out", $pm); print join(' ', @cmd), "\n"; system(@cmd); } -- cgit v1.1 From ab2d701649ef37f8ecc3477ab5be08df498f366f Mon Sep 17 00:00:00 2001 From: jnthn Date: Mon, 17 Mar 2014 18:11:13 +0100 Subject: Actually take/use the output extension. --- tools/build/module-install.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/build/module-install.pl') diff --git a/tools/build/module-install.pl b/tools/build/module-install.pl index ea22812..f6e06e0 100644 --- a/tools/build/module-install.pl +++ b/tools/build/module-install.pl @@ -9,6 +9,7 @@ use File::Basename; my $perl6bin = shift @ARGV; my $perl6lib = shift @ARGV; +my $compext = shift @ARGV; my $comptarget = shift @ARGV; my @pmfiles; @@ -77,7 +78,7 @@ do { chdir 'rakudo'; foreach my $pm (@pmfiles) { my $out = $pm; - $out =~ s/\.pm6?$/.$comptarget/; + $out =~ s/\.pm6?$/.$compext/; my @cmd = ($perl6bin, "--target=$comptarget", "--output=$out", $pm); print join(' ', @cmd), "\n"; system(@cmd); -- cgit v1.1 From 90eaf28ad6af34f3fd46663ed131bcfea811fe98 Mon Sep 17 00:00:00 2001 From: Andrew Egeler Date: Sat, 29 Mar 2014 12:19:02 -0400 Subject: Require file extension to be at end of filename --- tools/build/module-install.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/build/module-install.pl') diff --git a/tools/build/module-install.pl b/tools/build/module-install.pl index f6e06e0..b6be9c7 100644 --- a/tools/build/module-install.pl +++ b/tools/build/module-install.pl @@ -24,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; -- cgit v1.1