Changeset 5303
- Timestamp:
- 06/18/09 06:38:30 (3 years ago)
- File:
-
- 1 edited
-
trunk/Padre-Plugin-Perl6/Build.PL (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre-Plugin-Perl6/Build.PL
r5301 r5303 3 3 use Module::Build; 4 4 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 SUBCLASS48 5 49 6 … … 61 18 } 62 19 63 my $builder = $class->new(20 my $builder = Module::Build->new( 64 21 module_name => 'Padre::Plugin::Perl6', 65 22 license => 'perl',
Note: See TracChangeset
for help on using the changeset viewer.
