Permalink
Browse files

[autounfudge] do not unfudge rakudo.parrot fudges on JVM, or vice versa

  • Loading branch information...
1 parent ce3ea39 commit a0d7cece5faefc32b3b0b4214fc69c2761afd90e @moritz moritz committed Sep 1, 2013
Showing with 8 additions and 1 deletion.
  1. +8 −1 tools/autounfudge.pl
View
9 tools/autounfudge.pl
@@ -87,6 +87,12 @@ =head1 MISCELLANEA
my $path_sep = $^O eq 'MSWin32' ? ';' : ':';
my $slash = $^O eq 'MSWin32' ? '\\' : '/';
$ENV{PERL6LIB} = join($path_sep, qw/lib ./) unless $keep_env;
+my $impl_re = quotemeta $impl;
+
+if ($impl eq 'rakudo') {
+ my $postfix = $jvm ? 'jvm' : 'parrot';
+ $impl_re = qr{rakudo(?:\.$postfix)?(?=\s)};
+}
my %fh;
sub eval_server {
@@ -162,7 +168,7 @@ sub auto_unfudge_file {
print "Processing file '$file_name'\n";
my @fudge_lines;
while (<$f>) {
- push @fudge_lines, [$. , $_] if m/^\s*#\?$impl/ &&
+ push @fudge_lines, [$. , $_] if m/^\s*#\?$impl_re/ &&
!m/unspecced|unicode|utf-?8|noauto/i;
}
close $f;
@@ -239,6 +245,7 @@ sub usage {
--untodo Try to remove 'todo' markers
--out Output patch file (defaults to "autounfudge.patch")
--jobs number Number of threads to use when processing
+ --jvm For Rakudo running on the JVM
USAGE
}

0 comments on commit a0d7cec

Please sign in to comment.