makefiles: Generate the LINGUAS file.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0bb029f929
commit
f7a239a504
|
@ -17246,8 +17246,6 @@ test "$srcdir" = "." || wine_fn_config_symlink fonts/marlett.ttf fonts/symbol.tt
|
||||||
fi
|
fi
|
||||||
ac_config_links="$ac_config_links loader/l_intl.nls:loader/l_intl.nls"
|
ac_config_links="$ac_config_links loader/l_intl.nls:loader/l_intl.nls"
|
||||||
test "$srcdir" = "." || wine_fn_config_symlink loader/l_intl.nls
|
test "$srcdir" = "." || wine_fn_config_symlink loader/l_intl.nls
|
||||||
ac_config_links="$ac_config_links po/LINGUAS:po/LINGUAS"
|
|
||||||
test "$srcdir" = "." || wine_fn_config_symlink po/LINGUAS
|
|
||||||
ac_config_links="$ac_config_links wine:tools/winewrapper"
|
ac_config_links="$ac_config_links wine:tools/winewrapper"
|
||||||
wine_fn_config_symlink wine
|
wine_fn_config_symlink wine
|
||||||
if test "x$enable_win64" != xno; then
|
if test "x$enable_win64" != xno; then
|
||||||
|
@ -18970,7 +18968,6 @@ do
|
||||||
"fonts/tahomabd.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/tahomabd.ttf:fonts/tahomabd.ttf" ;;
|
"fonts/tahomabd.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/tahomabd.ttf:fonts/tahomabd.ttf" ;;
|
||||||
"fonts/wingding.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/wingding.ttf:fonts/wingding.ttf" ;;
|
"fonts/wingding.ttf") CONFIG_LINKS="$CONFIG_LINKS fonts/wingding.ttf:fonts/wingding.ttf" ;;
|
||||||
"loader/l_intl.nls") CONFIG_LINKS="$CONFIG_LINKS loader/l_intl.nls:loader/l_intl.nls" ;;
|
"loader/l_intl.nls") CONFIG_LINKS="$CONFIG_LINKS loader/l_intl.nls:loader/l_intl.nls" ;;
|
||||||
"po/LINGUAS") CONFIG_LINKS="$CONFIG_LINKS po/LINGUAS:po/LINGUAS" ;;
|
|
||||||
"wine") CONFIG_LINKS="$CONFIG_LINKS wine:tools/winewrapper" ;;
|
"wine") CONFIG_LINKS="$CONFIG_LINKS wine:tools/winewrapper" ;;
|
||||||
"wine64") CONFIG_LINKS="$CONFIG_LINKS wine64:tools/winewrapper" ;;
|
"wine64") CONFIG_LINKS="$CONFIG_LINKS wine64:tools/winewrapper" ;;
|
||||||
"tools/makedep") CONFIG_COMMANDS="$CONFIG_COMMANDS tools/makedep" ;;
|
"tools/makedep") CONFIG_COMMANDS="$CONFIG_COMMANDS tools/makedep" ;;
|
||||||
|
|
|
@ -2611,7 +2611,6 @@ test -n "$CROSSTARGET" || WINE_APPEND_RULE(
|
||||||
|
|
||||||
WINE_CONFIG_SYMLINK(fonts,fonts,[marlett.ttf,symbol.ttf,tahoma.ttf,tahomabd.ttf,wingding.ttf],enable_fonts)
|
WINE_CONFIG_SYMLINK(fonts,fonts,[marlett.ttf,symbol.ttf,tahoma.ttf,tahomabd.ttf,wingding.ttf],enable_fonts)
|
||||||
WINE_CONFIG_SYMLINK(loader,loader,[l_intl.nls])
|
WINE_CONFIG_SYMLINK(loader,loader,[l_intl.nls])
|
||||||
WINE_CONFIG_SYMLINK(po,po,[LINGUAS])
|
|
||||||
WINE_CONFIG_SYMLINK(,tools,[wine],,winewrapper)
|
WINE_CONFIG_SYMLINK(,tools,[wine],,winewrapper)
|
||||||
WINE_CONFIG_SYMLINK(,tools,[wine64],enable_win64,winewrapper)
|
WINE_CONFIG_SYMLINK(,tools,[wine64],enable_win64,winewrapper)
|
||||||
|
|
||||||
|
|
45
po/LINGUAS
45
po/LINGUAS
|
@ -1,45 +0,0 @@
|
||||||
ar
|
|
||||||
bg
|
|
||||||
ca
|
|
||||||
cs
|
|
||||||
da
|
|
||||||
de
|
|
||||||
el
|
|
||||||
en
|
|
||||||
en_US
|
|
||||||
eo
|
|
||||||
es
|
|
||||||
fa
|
|
||||||
fi
|
|
||||||
fr
|
|
||||||
he
|
|
||||||
hi
|
|
||||||
hr
|
|
||||||
hu
|
|
||||||
it
|
|
||||||
ja
|
|
||||||
ko
|
|
||||||
lt
|
|
||||||
ml
|
|
||||||
nb_NO
|
|
||||||
nl
|
|
||||||
or
|
|
||||||
pa
|
|
||||||
pl
|
|
||||||
pt_BR
|
|
||||||
pt_PT
|
|
||||||
rm
|
|
||||||
ro
|
|
||||||
ru
|
|
||||||
sk
|
|
||||||
sl
|
|
||||||
sr_RS@cyrillic
|
|
||||||
sr_RS@latin
|
|
||||||
sv
|
|
||||||
te
|
|
||||||
th
|
|
||||||
tr
|
|
||||||
uk
|
|
||||||
wa
|
|
||||||
zh_CN
|
|
||||||
zh_TW
|
|
|
@ -55,7 +55,7 @@ my %ignored_source_files = (
|
||||||
"tools/makedep.c" => 1,
|
"tools/makedep.c" => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
my (@linguas, @makefiles, %makefiles);
|
my (@makefiles, %makefiles);
|
||||||
|
|
||||||
sub dirname($)
|
sub dirname($)
|
||||||
{
|
{
|
||||||
|
@ -532,20 +532,10 @@ sub update_makefiles(@)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
################################################################
|
|
||||||
# update the LINGUAS file
|
|
||||||
|
|
||||||
sub update_linguas(@)
|
|
||||||
{
|
|
||||||
replace_in_file( "po/LINGUAS", undef, undef, join("\n", sort @_), "\n" );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
my $git_dir = $ENV{GIT_DIR} || ".git";
|
my $git_dir = $ENV{GIT_DIR} || ".git";
|
||||||
die "needs to be run from a git checkout" unless -d $git_dir;
|
die "needs to be run from a git checkout" unless -d $git_dir;
|
||||||
|
|
||||||
my @all_files = split /\0/, `git ls-files -c -z`;
|
my @all_files = split /\0/, `git ls-files -c -z`;
|
||||||
@linguas = map { (my $ret = $_) =~ s/^po\/(.*)\.po/$1/; $ret; } grep /^po\/.*\.po$/, @all_files;
|
|
||||||
@makefiles = map { (my $ret = $_) =~ s/\.in$//; $ret; } grep /Makefile.in$/, @all_files;
|
@makefiles = map { (my $ret = $_) =~ s/\.in$//; $ret; } grep /Makefile.in$/, @all_files;
|
||||||
|
|
||||||
foreach my $file (sort @makefiles)
|
foreach my $file (sort @makefiles)
|
||||||
|
@ -555,5 +545,4 @@ foreach my $file (sort @makefiles)
|
||||||
}
|
}
|
||||||
|
|
||||||
assign_sources_to_makefiles( @all_files );
|
assign_sources_to_makefiles( @all_files );
|
||||||
update_linguas( @linguas );
|
|
||||||
update_makefiles( @makefiles );
|
update_makefiles( @makefiles );
|
||||||
|
|
|
@ -2251,6 +2251,10 @@ static void output_po_files( const struct makefile *make )
|
||||||
output( ": %s/wine.pot\n", po_dir );
|
output( ": %s/wine.pot\n", po_dir );
|
||||||
output( "\tmsgmerge --previous -q $@ %s/wine.pot | msgattrib --no-obsolete -o $@.new && mv $@.new $@\n",
|
output( "\tmsgmerge --previous -q $@ %s/wine.pot | msgattrib --no-obsolete -o $@.new && mv $@.new $@\n",
|
||||||
po_dir );
|
po_dir );
|
||||||
|
output( "po:" );
|
||||||
|
for (i = 0; i < linguas.count; i++)
|
||||||
|
output_filename( strmake( "%s/%s.po", po_dir, linguas.str[i] ));
|
||||||
|
output( "\n" );
|
||||||
}
|
}
|
||||||
output( "%s/wine.pot:", po_dir );
|
output( "%s/wine.pot:", po_dir );
|
||||||
output_filenames( pot_files );
|
output_filenames( pot_files );
|
||||||
|
@ -3211,6 +3215,27 @@ static void rename_temp_file_if_changed( const char *dest )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************
|
||||||
|
* output_linguas
|
||||||
|
*/
|
||||||
|
static void output_linguas( const struct makefile *make )
|
||||||
|
{
|
||||||
|
const char *dest = base_dir_path( make, "LINGUAS" );
|
||||||
|
struct incl_file *source;
|
||||||
|
|
||||||
|
output_file = create_temp_file( dest );
|
||||||
|
|
||||||
|
output( "# Automatically generated by make depend; DO NOT EDIT!!\n" );
|
||||||
|
LIST_FOR_EACH_ENTRY( source, &make->sources, struct incl_file, entry )
|
||||||
|
if (strendswith( source->name, ".po" ))
|
||||||
|
output( "%s\n", replace_extension( source->name, ".po", "" ));
|
||||||
|
|
||||||
|
if (fclose( output_file )) fatal_perror( "write" );
|
||||||
|
output_file = NULL;
|
||||||
|
rename_temp_file_if_changed( dest );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
* output_testlist
|
* output_testlist
|
||||||
*/
|
*/
|
||||||
|
@ -3333,6 +3358,11 @@ static void output_dependencies( const struct makefile *make )
|
||||||
output_testlist( make );
|
output_testlist( make );
|
||||||
strarray_add( &ignore_files, "testlist.c" );
|
strarray_add( &ignore_files, "testlist.c" );
|
||||||
}
|
}
|
||||||
|
if (make->base_dir && !strcmp( make->base_dir, "po" ))
|
||||||
|
{
|
||||||
|
output_linguas( make );
|
||||||
|
strarray_add( &ignore_files, "LINGUAS" );
|
||||||
|
}
|
||||||
strarray_addall( &ignore_files, targets );
|
strarray_addall( &ignore_files, targets );
|
||||||
if (!make->src_dir) output_gitignore( base_dir_path( make, ".gitignore" ), ignore_files );
|
if (!make->src_dir) output_gitignore( base_dir_path( make, ".gitignore" ), ignore_files );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue