From: Magnus Hagander Date: Thu, 7 Feb 2008 13:49:00 +0000 (+0000) Subject: Fix msvc install script to properly install NLS files when built with X-Git-Tag: REL8_3_1~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=26351d1c747f6e682e0f1ba05b41be64c3f98dae;p=postgresql Fix msvc install script to properly install NLS files when built with gettext. --- diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index 546ce9ba35..f052d3bc3c 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -3,7 +3,7 @@ package Install; # # Package that provides 'make install' functionality for msvc builds # -# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.26 2007/12/03 15:42:58 mha Exp $ +# $PostgreSQL: pgsql/src/tools/msvc/Install.pm,v 1.27 2008/02/07 13:49:00 mha Exp $ # use strict; use warnings; @@ -456,27 +456,27 @@ sub GenerateNLSFiles print "Installing NLS files..."; EnsureDirectories($target, "share/locale"); my @flist; - File::Find::find({wanted => - sub { /^nls\.mk\z/s && - ! push(@flist, $File::Find::name); - } + File::Find::find({wanted => + sub { /^nls\.mk\z/s && + !push(@flist, $File::Find::name); + } }, "src"); foreach (@flist) { s/nls.mk/po/; my $dir = $_; - next unless ($dir =~ /([^\\]+)\\po$/); + next unless ($dir =~ /([^\/]+)\/po$/); my $prgm = $1; $prgm = 'postgres' if ($prgm eq 'backend'); foreach (glob("$dir/*.po")) { my $lang; - next unless /^(.*)\.po/; + next unless /([^\/]+)\.po/; $lang = $1; EnsureDirectories($target, "share/locale/$lang", "share/locale/$lang/LC_MESSAGES"); system( -"$nlspath\\bin\\msgfmt -o $target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm.mo $dir\\$_" +"$nlspath\\bin\\msgfmt -o $target\\share\\locale\\$lang\\LC_MESSAGES\\$prgm.mo $_" ) && croak("Could not run msgfmt on $dir\\$_"); print ".";