diff --git a/.gitignore b/.gitignore index 7ff26ad441..87aad300ad 100644 --- a/.gitignore +++ b/.gitignore @@ -281,6 +281,7 @@ programs/winetest/build.rc programs/winhlp32/macro.lex.yy.c programs/wscript/ihost.h programs/wscript/ihost.tlb +rsrc.pot server/wineserver server/wineserver-installed tools/fnt2bdf diff --git a/Make.rules.in b/Make.rules.in index 090a06e065..eea8e8e0a2 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) $(MC_SRCS:.mc=.mc.rc) + $(BISON_SRCS:.y=.tab.c) $(BISON_SRCS:.y=.tab.h) $(LEX_SRCS:.l=.yy.c) \ + $(MC_SRCS:.mc=.mc.rc) $(PO_SRCS:%=rsrc.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=.mc.res) $(EXTRA_OBJS) @@ -174,15 +175,21 @@ install install-lib install-dev uninstall:: .PHONY: install install-lib install-dev uninstall -# Misc. rules +# Rules for resources + +all: @MAINTAINER_MODE@ $(PO_SRCS:%=rsrc.pot) + +$(PO_SRCS:%=rsrc.pot): $(WRC) $(PO_SRCS) + $(LDPATH) $(WRC) $(RCFLAGS) -O pot -o $@ $(PO_SRCS) $(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) +# Misc. rules + +$(IDL_GEN_HEADERS) $(IDL_GEN_C_SRCS) $(IDL_TLB_SRCS:.idl=.tlb) $(IDL_R_SRCS:.idl=_r.res): $(WIDL) + dummy: .PHONY: dummy diff --git a/aclocal.m4 b/aclocal.m4 index 0cd5608eaf..79486ab0ea 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -150,6 +150,7 @@ all: Makefile Makefile: Makefile.in Make.vars.in Make.rules config.status @./config.status Make.tmp Makefile" +ALL_POT_FILES="" AC_SUBST(ALL_WINETEST_DEPENDS,["# Test binaries"]) AC_SUBST(ALL_TEST_BINARIES,"") @@ -266,7 +267,14 @@ install:: $ac_dir/Makefile __builddeps__ install-lib:: $ac_dir/Makefile __builddeps__ @cd $ac_dir && \$(MAKE) install-lib uninstall manpages htmlpages sgmlpages xmlpages:: $ac_dir/Makefile - @cd $ac_dir && \$(MAKE) \$[@]"]) + @cd $ac_dir && \$(MAKE) \$[@]" + + if test "x$enable_maintainer_mode" = xyes && 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]) if wine_fn_has_flag staticimplib $ac_flags then @@ -338,6 +346,13 @@ 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 + 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 + wine_fn_has_flag install $ac_flags || return wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "install install-lib:: $ac_dir/Makefile __builddeps__ diff --git a/configure b/configure index 2074d3b0b8..9ea4c4a545 100755 --- a/configure +++ b/configure @@ -14471,6 +14471,7 @@ all: Makefile Makefile: Makefile.in Make.vars.in Make.rules config.status @./config.status Make.tmp Makefile" +ALL_POT_FILES="" ALL_WINETEST_DEPENDS="# Test binaries" ALL_TEST_BINARIES="" @@ -14591,6 +14592,13 @@ install-lib:: $ac_dir/Makefile __builddeps__ @cd $ac_dir && \$(MAKE) install-lib 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 + 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 @@ -14666,6 +14674,13 @@ 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 + 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 + wine_fn_has_flag install $ac_flags || return wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "install install-lib:: $ac_dir/Makefile __builddeps__ @@ -15379,7 +15394,7 @@ wine_fn_config_makefile loader enable_loader wine_fn_config_program aspnet_regiis enable_aspnet_regiis install wine_fn_config_program attrib enable_attrib install wine_fn_config_program cacls enable_cacls install -wine_fn_config_program clock enable_clock install +wine_fn_config_program clock enable_clock po,install wine_fn_config_program cmd enable_cmd install wine_fn_config_test programs/cmd/tests cmd.exe_test wine_fn_config_program cmdlgtst enable_cmdlgtst @@ -15510,7 +15525,14 @@ then \$(srcdir)/include/config.h.in: include/stamp-h.in \$(srcdir)/include/stamp-h.in: configure.ac aclocal.m4 cd \$(srcdir) && autoheader --warnings=all - @echo timestamp > \$@" + @echo timestamp > \$@ + +ALL_POT_FILES =$ALL_POT_FILES +all: \$(ALL_PO_FILES) +\$(ALL_PO_FILES): \$(srcdir)/po/wine.pot + msgmerge -U -q --backup=none \$@ \$(srcdir)/po/wine.pot && touch \$@ +\$(srcdir)/po/wine.pot: \$(ALL_POT_FILES) + msgcat -o \$@ \$(ALL_POT_FILES)" fi if test -n "$with_wine64" diff --git a/configure.ac b/configure.ac index f27659dc8b..1ae12acfd6 100644 --- a/configure.ac +++ b/configure.ac @@ -2865,7 +2865,7 @@ WINE_CONFIG_MAKEFILE([loader]) WINE_CONFIG_PROGRAM(aspnet_regiis,,[install]) WINE_CONFIG_PROGRAM(attrib,,[install]) WINE_CONFIG_PROGRAM(cacls,,[install]) -WINE_CONFIG_PROGRAM(clock,,[install]) +WINE_CONFIG_PROGRAM(clock,,[po,install]) WINE_CONFIG_PROGRAM(cmd,,[install]) WINE_CONFIG_TEST(programs/cmd/tests) WINE_CONFIG_PROGRAM(cmdlgtst) @@ -3003,7 +3003,14 @@ then \$(srcdir)/include/config.h.in: include/stamp-h.in \$(srcdir)/include/stamp-h.in: configure.ac aclocal.m4 cd \$(srcdir) && autoheader --warnings=all - @echo timestamp > \$[@]]) + @echo timestamp > \$[@] + +ALL_POT_FILES =$ALL_POT_FILES +all: \$(ALL_PO_FILES) +\$(ALL_PO_FILES): \$(srcdir)/po/wine.pot + msgmerge -U -q --backup=none \$[@] \$(srcdir)/po/wine.pot && touch \$[@] +\$(srcdir)/po/wine.pot: \$(ALL_POT_FILES) + msgcat -o \$[@] \$(ALL_POT_FILES)]) fi if test -n "$with_wine64" diff --git a/tools/make_makefiles b/tools/make_makefiles index 08e7dd2626..97c8d40205 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -100,6 +100,7 @@ my @ignores = ( "programs/winetest/*_test.rc", "programs/winetest/build.nfo", "programs/winetest/build.rc", + "rsrc.pot", "tools/makedep", ); @@ -315,7 +316,7 @@ sub parse_makefile($) $make{$1} = $2; next; } - if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_[CHIPRS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|C_SRCS|MC_SRCS|RC_SRCS|SVG_SRCS|PROGRAMS)\s*=\s*(.*)/) + if (/^\s*(BISON_SRCS|LEX_SRCS|IDL_[CHIPRS]_SRCS|IDL_TLB_SRCS|IMPLIB_SRCS|C_SRCS|MC_SRCS|RC_SRCS|PO_SRCS|SVG_SRCS|PROGRAMS)\s*=\s*(.*)/) { my @list = split(/\s+/, $2); $make{$1} = \@list; @@ -424,6 +425,7 @@ sub update_makefiles(@) die "Invalid MODULE in $file" unless $make{"MODULE"} eq "$name.dll"; } my $implib = $make{"IMPORTLIB"} || ""; + push @flags, "po" if defined $make{"PO_SRCS"}; push @flags, "implib" if $implib; push @flags, "staticimplib" if defined($make{"IMPLIB_SRCS"}); $args .= "," if $is_win16 || @flags; @@ -443,6 +445,7 @@ sub update_makefiles(@) { die "Invalid MODULE in $file" unless $make{"MODULE"} eq "$name.exe"; } + push @flags, "po" if defined $make{"PO_SRCS"}; push @flags, "install" unless $dont_install{$name}; push @flags, "installbin" if $bin_install{$name}; $args .= "," if $is_win16 || @flags;