diff --git a/configure b/configure index 2f40d7e886..31573d0f4f 100755 --- a/configure +++ b/configure @@ -17246,8 +17246,6 @@ test "$srcdir" = "." || wine_fn_config_symlink fonts/marlett.ttf fonts/symbol.tt fi ac_config_links="$ac_config_links loader/l_intl.nls: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" wine_fn_config_symlink wine 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/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" ;; - "po/LINGUAS") CONFIG_LINKS="$CONFIG_LINKS po/LINGUAS:po/LINGUAS" ;; "wine") CONFIG_LINKS="$CONFIG_LINKS wine:tools/winewrapper" ;; "wine64") CONFIG_LINKS="$CONFIG_LINKS wine64:tools/winewrapper" ;; "tools/makedep") CONFIG_COMMANDS="$CONFIG_COMMANDS tools/makedep" ;; diff --git a/configure.ac b/configure.ac index 54b16f65bd..82a8d0f3c6 100644 --- a/configure.ac +++ b/configure.ac @@ -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(loader,loader,[l_intl.nls]) -WINE_CONFIG_SYMLINK(po,po,[LINGUAS]) WINE_CONFIG_SYMLINK(,tools,[wine],,winewrapper) WINE_CONFIG_SYMLINK(,tools,[wine64],enable_win64,winewrapper) diff --git a/po/LINGUAS b/po/LINGUAS deleted file mode 100644 index 091a734959..0000000000 --- a/po/LINGUAS +++ /dev/null @@ -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 diff --git a/tools/make_makefiles b/tools/make_makefiles index 98f65d3197..a5e8a05e35 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -55,7 +55,7 @@ my %ignored_source_files = ( "tools/makedep.c" => 1, ); -my (@linguas, @makefiles, %makefiles); +my (@makefiles, %makefiles); 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"; die "needs to be run from a git checkout" unless -d $git_dir; 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; foreach my $file (sort @makefiles) @@ -555,5 +545,4 @@ foreach my $file (sort @makefiles) } assign_sources_to_makefiles( @all_files ); -update_linguas( @linguas ); update_makefiles( @makefiles ); diff --git a/tools/makedep.c b/tools/makedep.c index 687bf3f86d..adb8a40664 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2251,6 +2251,10 @@ static void output_po_files( const struct makefile *make ) output( ": %s/wine.pot\n", po_dir ); output( "\tmsgmerge --previous -q $@ %s/wine.pot | msgattrib --no-obsolete -o $@.new && mv $@.new $@\n", 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_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 */ @@ -3333,6 +3358,11 @@ static void output_dependencies( const struct makefile *make ) output_testlist( make ); 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 ); if (!make->src_dir) output_gitignore( base_dir_path( make, ".gitignore" ), ignore_files );