makefiles: Add dependencies on all po files for po-translated resources.

This commit is contained in:
Alexandre Julliard 2011-01-04 16:55:54 +01:00
parent f859535774
commit 7c2a4bf25e
6 changed files with 101 additions and 2 deletions

View File

@ -181,6 +181,7 @@ $(MC_SRCS:.mc=.mc.rc): $(WMC)
$(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) $(IDL_R_SRCS:.idl=_r.res): $(WIDL)
$(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.mc.res): $(WRC)
$(PO_SRCS:.rc=.res): $(ALL_PO_FILES)
dummy:

View File

@ -53,6 +53,8 @@ RSVG = @RSVG@
CONVERT = @CONVERT@
ICOTOOL = @ICOTOOL@
CROSSTARGET = @CROSSTARGET@
LINGUAS = @LINGUAS@
ALL_PO_FILES = $(LINGUAS:%=@top_srcdir@/po/%.po)
CROSSAR = $(CROSSTARGET)-ar
CROSSRANLIB = $(CROSSTARGET)-ranlib
MKINSTALLDIRS = $(top_srcdir)/tools/mkinstalldirs -m 755

42
configure vendored
View File

@ -596,6 +596,7 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
LINGUAS
ALL_TEST_BINARIES
ALL_WINETEST_DEPENDS
LDAPLIBS
@ -15454,6 +15455,47 @@ wine_fn_config_tool tools/winegcc
wine_fn_config_tool tools/wmc
wine_fn_config_tool tools/wrc
LINGUAS="\
cs \
da \
de \
en_US \
eo \
es \
fi \
fr \
he \
hi \
hu \
it \
ja \
ko \
lt \
ml \
nb_NO \
nl \
or \
pa \
pl \
pt_BR \
pt_PT \
ro \
ru \
sk \
sl \
sr_Latn_SP \
sr_SP \
sv \
te \
th \
tr \
uk \
wa \
zh_CN \
zh_TW"
ac_config_commands="$ac_config_commands Makefile"

View File

@ -2940,6 +2940,46 @@ WINE_CONFIG_TOOL(tools/winedump)
WINE_CONFIG_TOOL(tools/winegcc)
WINE_CONFIG_TOOL(tools/wmc)
WINE_CONFIG_TOOL(tools/wrc)
AC_SUBST([LINGUAS],["\
cs \
da \
de \
en_US \
eo \
es \
fi \
fr \
he \
hi \
hu \
it \
ja \
ko \
lt \
ml \
nb_NO \
nl \
or \
pa \
pl \
pt_BR \
pt_PT \
ro \
ru \
sk \
sl \
sr_Latn_SP \
sr_SP \
sv \
te \
th \
tr \
uk \
wa \
zh_CN \
zh_TW"])
dnl End of auto-generated output commands
AC_CONFIG_COMMANDS([Makefile], [wine_fn_output_makefile Makefile],

View File

@ -8,5 +8,6 @@ C_SRCS = \
winclock.c
RC_SRCS = clock.rc
PO_SRCS = clock.rc
@MAKE_PROG_RULES@

View File

@ -170,7 +170,7 @@ my %ignored_source_files = (
"programs/winetest/dist.rc" => 1,
);
my (@makefiles, %makefiles);
my (@linguas, @makefiles, %makefiles);
sub dirname($)
{
@ -472,6 +472,8 @@ sub update_makefiles(@)
}
}
push @lines, "\nAC_SUBST([LINGUAS],[\"\\\n", join( " \\\n", sort @linguas ), "\"])\n\n";
# update the source variables in all the makefiles
foreach my $file (sort @_)
@ -563,10 +565,20 @@ sub update_gitignore(@)
}
################################################################
# update the LINGUAS file
sub update_linguas(@)
{
replace_in_file( "po/LINGUAS", undef, undef, join("\n", sort @_), "\n" );
}
die "needs to be run from a git checkout" unless -d ".git";
my @all_files = split /\0/, `git ls-files -c -z`;
@makefiles = map { my $ret = $_; $ret =~ s/\.in$//; $ret; } grep /Makefile.in$/, @all_files;
@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 values %makerules, @makefiles)
{
@ -575,6 +587,7 @@ foreach my $file (sort values %makerules, @makefiles)
}
assign_sources_to_makefiles( @all_files );
update_linguas( @linguas );
update_makefiles( @makefiles );
push @ignores, update_ignores( @makefiles );
update_gitignore( @ignores );