Changeset 5303


Ignore:
Timestamp:
06/18/09 06:38:30 (3 years ago)
Author:
szabgab
Message:

remove building of .mo files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre-Plugin-Perl6/Build.PL

    r5301 r5303  
    33use Module::Build; 
    44 
    5 #unless($ENV{PADRE_PLUGIN_PERL6}) { 
    6 #   warn "\nWARNING: Please set PADRE_PLUGIN_PERL6 to generate translation files.\n\n"; 
    7 #} 
    8  
    9 my $class = Module::Build->subclass( 
    10     class => "Module::Build::Custom", 
    11     code => <<'SUBCLASS' ); 
    12  
    13 sub ACTION_build { 
    14     my $self = shift; 
    15  
    16     if($ENV{PADRE_PLUGIN_PERL6}) { 
    17         my $msgfmt = ($^O =~ /win32/i) 
    18             ? qq{c:/Program Files/GnuWin32/bin/msgfmt.exe} 
    19             : `which msgfmt`;  
    20         chomp $msgfmt; 
    21         if ( $msgfmt && -e $msgfmt ) { 
    22             my @pofiles = glob "lib/Padre/Plugin/Perl6/share/locale/*.po"; 
    23             foreach my $pof ( @pofiles ) { 
    24                 my $mof = $pof; 
    25                 $mof =~ s/\.po$/.mo/; 
    26                 print qq{Generating $mof\n}; 
    27                 system qq{"$msgfmt" -o $mof $pof}; 
    28             } 
    29         } else { 
    30             die "Could not find $msgfmt!\n"; 
    31         } 
    32     } 
    33  
    34     $self->SUPER::ACTION_build;  
    35 } 
    36  
    37 sub ACTION_dist { 
    38          
    39     if($ENV{PADRE_PLUGIN_PERL6}) { 
    40         my $self = shift; 
    41         $self->SUPER::ACTION_dist; 
    42     } else { 
    43         die "You did not enable PADRE_PLUGIN_PERL6 environment variable."; 
    44     } 
    45 } 
    46  
    47 SUBCLASS 
    485 
    496 
     
    6118} 
    6219 
    63 my $builder = $class->new( 
     20my $builder = Module::Build->new( 
    6421    module_name         => 'Padre::Plugin::Perl6', 
    6522    license             => 'perl', 
Note: See TracChangeset for help on using the changeset viewer.