From 417b70bf44f326f0b2ad27f2ab41c96f81581a1a Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 24 Jan 2011 21:23:03 +0100 Subject: [PATCH] makefiles: Add rules to update po files from .mc files in maintainer mode. --- .gitignore | 1 + Make.rules.in | 12 ++++++++---- aclocal.m4 | 30 ++++++++++++++++++++++++------ configure | 32 +++++++++++++++++++++++++------- configure.ac | 2 +- tools/make_makefiles | 3 +++ 6 files changed, 62 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index d91e56883d3..0a6a5899923 100644 --- a/.gitignore +++ b/.gitignore @@ -251,6 +251,7 @@ loader/wine-installed loader/wine-preloader loader/wine64 loader/wine64-preloader +msg.pot programs/Makeprog.rules programs/rpcss/epm.h programs/rpcss/epm_s.c diff --git a/Make.rules.in b/Make.rules.in index f44bc55feb2..cd9c22e50d4 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -26,7 +26,8 @@ IDL_GEN_HEADERS = $(IDL_H_SRCS:.idl=.h) $(IDL_C_SRCS:.idl=.h) $(IDL_I_SRCS:.idl= CLEAN_FILES = *.o *.a *.so *.ln *.res *.fake *.$(LIBEXT) \\\#*\\\# *~ *% .\\\#* *.bak *.orig *.rej *.flc core CLEAN_TARGETS = $(IDL_GEN_C_SRCS) $(IDL_GEN_HEADERS) $(IDL_TLB_SRCS:.idl=.tlb) $(IDL_P_SRCS:%=dlldata.c) \ - $(BISON_SRCS:.y=.tab.c) $(BISON_SRCS:.y=.tab.h) $(LEX_SRCS:.l=.yy.c) $(PO_SRCS:%=rsrc.pot) + $(BISON_SRCS:.y=.tab.c) $(BISON_SRCS:.y=.tab.h) $(LEX_SRCS:.l=.yy.c) \ + $(PO_SRCS:%=rsrc.pot) $(MC_SRCS:%=msg.pot) OBJS = $(C_SRCS:.c=.o) $(BISON_SRCS:.y=.tab.o) $(LEX_SRCS:.l=.yy.o) $(IDL_GEN_C_SRCS:.c=.o) \ $(IDL_R_SRCS:.idl=_r.res) $(RC_SRCS:.rc=.res) $(MC_SRCS:.mc=.res) $(EXTRA_OBJS) @@ -59,7 +60,7 @@ filter: dummy $(FLEX) $(LEXFLAGS) -o$@ $< .mc.res: - $(LDPATH) $(WMC) -U -O res -o $@ $< + $(LDPATH) $(WMC) -U -O res -P $(top_srcdir)/po -o $@ $< .rc.res: $(LDPATH) $(WRC) $(RCFLAGS) -o $@ $< @@ -176,12 +177,15 @@ install install-lib install-dev uninstall:: # Rules for resources -all: @MAINTAINER_MODE@ $(PO_SRCS:%=rsrc.pot) +all: @MAINTAINER_MODE@ $(PO_SRCS:%=rsrc.pot) $(MC_SRCS:%=msg.pot) rsrc.pot: $(WRC) $(LDPATH) $(WRC) $(RCFLAGS) -O pot -o $@ $(PO_SRCS) -$(MC_SRCS:.mc=.res): $(WMC) +msg.pot: $(WMC) + $(LDPATH) $(WMC) -O pot -o $@ $(MC_SRCS) + +$(MC_SRCS:.mc=.res): $(WMC) $(ALL_PO_FILES) $(RC_SRCS:.rc=.res): $(WRC) $(PO_SRCS:.rc=.res): $(ALL_PO_FILES) diff --git a/aclocal.m4 b/aclocal.m4 index 79486ab0ea5..234a6b8ac19 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -269,11 +269,20 @@ install-lib:: $ac_dir/Makefile __builddeps__ uninstall manpages htmlpages sgmlpages xmlpages:: $ac_dir/Makefile @cd $ac_dir && \$(MAKE) \$[@]" - if test "x$enable_maintainer_mode" = xyes && wine_fn_has_flag po $ac_flags + if test "x$enable_maintainer_mode" = xyes then - wine_fn_append_file ALL_POT_FILES $ac_dir/rsrc.pot - wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ + if wine_fn_has_flag mc $ac_flags + then + wine_fn_append_file ALL_POT_FILES $ac_dir/msg.pot + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/msg.pot: $ac_dir" + fi + if wine_fn_has_flag po $ac_flags + then + wine_fn_append_file ALL_POT_FILES $ac_dir/rsrc.pot + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "$ac_dir/rsrc.pot: $ac_dir" + fi fi]) if wine_fn_has_flag staticimplib $ac_flags @@ -346,11 +355,20 @@ wine_fn_config_program () $ac_dir: $ac_dir/Makefile __builddeps__ dummy @cd $ac_dir && \$(MAKE)" - if test "x$enable_maintainer_mode" = xyes && wine_fn_has_flag po $ac_flags + if test "x$enable_maintainer_mode" = xyes then - wine_fn_append_file ALL_POT_FILES $ac_dir/rsrc.pot - wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ + if wine_fn_has_flag mc $ac_flags + then + wine_fn_append_file ALL_POT_FILES $ac_dir/msg.pot + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/msg.pot: $ac_dir" + fi + if wine_fn_has_flag po $ac_flags + then + wine_fn_append_file ALL_POT_FILES $ac_dir/rsrc.pot + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "$ac_dir/rsrc.pot: $ac_dir" + fi fi wine_fn_has_flag install $ac_flags || return diff --git a/configure b/configure index 1ea906ddf9e..a3b5ad9c50b 100755 --- a/configure +++ b/configure @@ -14529,11 +14529,20 @@ install-lib:: $ac_dir/Makefile __builddeps__ uninstall manpages htmlpages sgmlpages xmlpages:: $ac_dir/Makefile @cd $ac_dir && \$(MAKE) \$@" - if test "x$enable_maintainer_mode" = xyes && wine_fn_has_flag po $ac_flags + if test "x$enable_maintainer_mode" = xyes then - wine_fn_append_file ALL_POT_FILES $ac_dir/rsrc.pot - wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ + if wine_fn_has_flag mc $ac_flags + then + wine_fn_append_file ALL_POT_FILES $ac_dir/msg.pot + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/msg.pot: $ac_dir" + fi + if wine_fn_has_flag po $ac_flags + then + wine_fn_append_file ALL_POT_FILES $ac_dir/rsrc.pot + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "$ac_dir/rsrc.pot: $ac_dir" + fi fi fi @@ -14610,11 +14619,20 @@ else $ac_dir: $ac_dir/Makefile __builddeps__ dummy @cd $ac_dir && \$(MAKE)" - if test "x$enable_maintainer_mode" = xyes && wine_fn_has_flag po $ac_flags + if test "x$enable_maintainer_mode" = xyes then - wine_fn_append_file ALL_POT_FILES $ac_dir/rsrc.pot - wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ + if wine_fn_has_flag mc $ac_flags + then + wine_fn_append_file ALL_POT_FILES $ac_dir/msg.pot + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ +"$ac_dir/msg.pot: $ac_dir" + fi + if wine_fn_has_flag po $ac_flags + then + wine_fn_append_file ALL_POT_FILES $ac_dir/rsrc.pot + wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "$ac_dir/rsrc.pot: $ac_dir" + fi fi wine_fn_has_flag install $ac_flags || return @@ -15004,7 +15022,7 @@ wine_fn_config_dll itss enable_itss wine_fn_config_test dlls/itss/tests itss_test wine_fn_config_dll jscript enable_jscript po wine_fn_config_test dlls/jscript/tests jscript_test -wine_fn_config_dll kernel32 enable_kernel32 implib +wine_fn_config_dll kernel32 enable_kernel32 mc,implib wine_fn_config_test dlls/kernel32/tests kernel32_test wine_fn_config_dll keyboard.drv16 enable_win16 wine_fn_config_dll krnl386.exe16 enable_win16 implib kernel diff --git a/configure.ac b/configure.ac index 4d049b6dc41..a7a13392941 100644 --- a/configure.ac +++ b/configure.ac @@ -2533,7 +2533,7 @@ WINE_CONFIG_DLL(itss) WINE_CONFIG_TEST(dlls/itss/tests) WINE_CONFIG_DLL(jscript,,[po]) WINE_CONFIG_TEST(dlls/jscript/tests) -WINE_CONFIG_DLL(kernel32,,[implib]) +WINE_CONFIG_DLL(kernel32,,[mc,implib]) WINE_CONFIG_TEST(dlls/kernel32/tests) WINE_CONFIG_DLL(keyboard.drv16,enable_win16) WINE_CONFIG_DLL(krnl386.exe16,enable_win16,[implib],[kernel]) diff --git a/tools/make_makefiles b/tools/make_makefiles index 991ef4b7122..182aef5e39a 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -96,6 +96,7 @@ my @ignores = ( "*/*/tests/testlist.c", "include/config.h", "include/stamp-h", + "msg.pot", "programs/winetest/*_test.exe", "programs/winetest/*_test.rc", "programs/winetest/build.nfo", @@ -424,6 +425,7 @@ sub update_makefiles(@) die "Invalid MODULE in $file" unless $make{"MODULE"} eq "$name.dll"; } my $implib = $make{"IMPORTLIB"} || ""; + push @flags, "mc" if defined $make{"MC_SRCS"}; push @flags, "po" if defined $make{"PO_SRCS"}; push @flags, "implib" if $implib; push @flags, "staticimplib" if defined($make{"IMPLIB_SRCS"}); @@ -444,6 +446,7 @@ sub update_makefiles(@) { die "Invalid MODULE in $file" unless $make{"MODULE"} eq "$name.exe"; } + push @flags, "mc" if defined $make{"MC_SRCS"}; push @flags, "po" if defined $make{"PO_SRCS"}; push @flags, "install" unless $dont_install{$name}; push @flags, "installbin" if $bin_install{$name}; -- 2.11.4.GIT