makedep: Generate dependencies for mo files when supported.

This commit is contained in:
Alexandre Julliard 2014-01-14 11:49:42 +01:00
parent d19b68fa1a
commit ab4fc685ba
4 changed files with 41 additions and 42 deletions

View File

@ -49,8 +49,6 @@ ICOTOOL = @ICOTOOL@
MSGFMT = @MSGFMT@
CROSSTARGET = @CROSSTARGET@
LINGUAS = @LINGUAS@
ALL_MO_FILES = $(LINGUAS:%=@top_builddir@/po/%.mo)
PORCFLAGS = @PORCFLAGS@
RUNTESTFLAGS = -q -P wine
MAKEDEP = $(TOOLSDIR)/tools/makedep$(TOOLSEXT)
SFNT2FNT = $(TOOLSDIR)/tools/sfnt2fnt$(TOOLSEXT)

7
configure vendored
View File

@ -624,7 +624,6 @@ ac_includes_default="\
ac_subst_vars='LTLIBOBJS
LIBOBJS
PORCFLAGS
LINGUAS
LDAPLIBS
LIBRT
@ -17383,11 +17382,9 @@ fi
if test "$MSGFMT" != false
then
PORCFLAGS="--po-dir=\$(top_builddir)/po"
wine_fn_append_rule "__builddeps__: \$(ALL_MO_FILES)
wine_fn_append_rule "__builddeps__: \$(LINGUAS:%=po/%.mo)
clean::
\$(RM) \$(ALL_MO_FILES)"
\$(RM) \$(LINGUAS:%=po/%.mo)"
posrc="po"
test "$srcdir" = . || posrc="$srcdir/po"

View File

@ -3445,11 +3445,10 @@ fi
if test "$MSGFMT" != false
then
AC_SUBST([PORCFLAGS],["--po-dir=\$(top_builddir)/po"])
WINE_APPEND_RULE(
[__builddeps__: \$(ALL_MO_FILES)
[__builddeps__: \$(LINGUAS:%=po/%.mo)
clean::
\$(RM) \$(ALL_MO_FILES)])
\$(RM) \$(LINGUAS:%=po/%.mo)])
posrc="po"
test "$srcdir" = . || posrc="$srcdir/po"

View File

@ -1408,6 +1408,7 @@ static struct strarray output_sources(void)
struct strarray res_files = empty_strarray;
struct strarray clean_files = empty_strarray;
struct strarray po_files = empty_strarray;
struct strarray mo_files = empty_strarray;
struct strarray mc_files = empty_strarray;
struct strarray test_files = empty_strarray;
struct strarray dlldata_files = empty_strarray;
@ -1415,6 +1416,7 @@ static struct strarray output_sources(void)
struct strarray implib_objs = empty_strarray;
struct strarray includes = empty_strarray;
struct strarray phony_targets = empty_strarray;
struct strarray linguas = get_expanded_make_var_array( "LINGUAS" );
struct strarray all_targets = get_expanded_make_var_array( "PROGRAMS" );
struct strarray targetflags = get_expanded_make_var_array( "TARGETFLAGS" );
struct strarray delayimports = get_expanded_make_var_array( "DELAYIMPORTS" );
@ -1429,6 +1431,9 @@ static struct strarray output_sources(void)
if (module && strendswith( module, ".a" )) staticlib = module;
for (i = 0; i < extradllflags.count; i++) if (!strcmp( extradllflags.str[i], "-m16" )) is_win16 = 1;
for (i = 0; i < linguas.count; i++)
strarray_add( &mo_files, strmake( "%s/po/%s.mo", top_obj_dir, linguas.str[i] ));
strarray_add( &includes, "-I." );
if (src_dir) strarray_add( &includes, strmake( "-I%s", src_dir ));
if (parent_dir) strarray_add( &includes, strmake( "-I%s", src_dir_path( parent_dir )));
@ -1491,47 +1496,47 @@ static struct strarray output_sources(void)
}
else if (!strcmp( ext, "rc" )) /* resource file */
{
if (source->flags & FLAG_RC_PO)
strarray_add( &res_files, strmake( "%s.res", obj ));
output( "%s.res: %s %s\n", obj, tools_path( "wrc" ), source->filename );
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
output( "\t%s -o $@ %s", tools_path( "wrc" ), source->filename );
if (is_win16) output_filename( "-m16" );
else output_filenames( targetflags );
output_filename( "--nostdinc" );
output_filenames( includes );
output_filenames( define_args );
output_filenames( extradefs );
if (mo_files.count && (source->flags & FLAG_RC_PO))
{
output( "%s.res: %s $(ALL_MO_FILES) %s\n", obj, tools_path( "wrc" ), source->filename );
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
output( "\t%s -o $@ %s", tools_path( "wrc" ), source->filename );
if (is_win16) output_filename( "-m16" );
else output_filenames( targetflags );
output_filename( "--nostdinc" );
output_filenames( includes );
output_filenames( define_args );
output_filenames( extradefs );
output_filename( "$(PORCFLAGS)" );
output( "\n" );
output( "%s.res rsrc.pot:", obj );
strarray_add( &po_files, source->filename );
}
else
{
output( "%s.res: %s %s\n", obj, tools_path( "wrc" ), source->filename );
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
output( "\t%s -o $@ %s", tools_path( "wrc" ), source->filename );
if (is_win16) output_filename( "-m16" );
else output_filenames( targetflags );
output_filename( "--nostdinc" );
output_filenames( includes );
output_filenames( define_args );
output_filenames( extradefs );
output_filename( "$(PORCFLAGS)" );
output_filename( strmake( "--po-dir=%s/po", top_obj_dir ));
output( "\n" );
output( "%s.res:", obj );
output_filenames( mo_files );
output( "\n" );
output( "rsrc.pot " );
}
strarray_add( &res_files, strmake( "%s.res", obj ));
else output( "\n" );
output( "%s.res:", obj );
}
else if (!strcmp( ext, "mc" )) /* message file */
{
output( "%s.res: %s $(ALL_MO_FILES) %s\n", obj, tools_path( "wmc" ), source->filename );
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
output( "\t%s -U -O res $(PORCFLAGS) -o $@ %s\n", tools_path( "wmc" ), source->filename );
strarray_add( &res_files, strmake( "%s.res", obj ));
strarray_add( &mc_files, source->filename );
output( "msg.pot %s.res:", obj );
output( "%s.res: %s %s\n", obj, tools_path( "wmc" ), source->filename );
if (subdir) output( "\t$(MKDIR_P) -m 755 %s\n", subdir );
output( "\t%s -U -O res -o $@ %s", tools_path( "wmc" ), source->filename );
if (mo_files.count)
{
strarray_add( &mc_files, source->filename );
output_filename( strmake( "--po-dir=%s/po", top_obj_dir ));
output( "\n" );
output( "%s.res:", obj );
output_filenames( mo_files );
output( "\n" );
output( "msg.pot " );
}
else output( "\n" );
output( "%s.res:", obj );
}
else if (!strcmp( ext, "idl" )) /* IDL file */
{