From 9c98f6911b6ea991aee4cad18c16485fff0fedd9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 22 Oct 2011 14:54:03 +0200 Subject: [PATCH] makefiles: Build the pot files with a separate pass from the top-level makefile. --- Make.rules.in | 2 -- aclocal.m4 | 57 ++++++++++++++++++++++++--------------------------- configure | 57 ++++++++++++++++++++++++--------------------------- 3 files changed, 54 insertions(+), 62 deletions(-) diff --git a/Make.rules.in b/Make.rules.in index c3409ac1fa2..a0956665f24 100644 --- a/Make.rules.in +++ b/Make.rules.in @@ -180,8 +180,6 @@ install install-lib install-dev uninstall:: # Rules for resources -all: @MAINTAINER_MODE@ $(PO_SRCS:%=rsrc.pot) $(MC_SRCS:%=msg.pot) - rsrc.pot: $(WRC) $(LDPATH) $(WRC) $(RCFLAGS) -O pot -o $@ $(PO_SRCS) diff --git a/aclocal.m4 b/aclocal.m4 index 41274ad43d3..7a75fa9bb69 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -199,6 +199,31 @@ $ac_dir/__depend__: $ac_makedep dummy @./config.status --file $ac_dir/Makefile:$ac_input && cd $ac_dir && \$(MAKE) depend" } +wine_fn_pot_rules () +{ + ac_dir=$[1] + ac_flags=$[2] + + test "x$enable_maintainer_mode" = xyes || return + + 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/Makefile dummy + @cd $ac_dir && \$(MAKE) msg.pot +$ac_dir/msg.pot: tools/wmc include" + 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/Makefile dummy + @cd $ac_dir && \$(MAKE) rsrc.pot +$ac_dir/srsrc.pot: tools/wrc include" + fi +} + wine_fn_config_makefile () { ac_dir=$[1] @@ -322,21 +347,7 @@ $ac_dir/__uninstall__:: fi fi - if test "x$enable_maintainer_mode" = xyes - then - 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_pot_rules $ac_dir $ac_flags]) if wine_fn_has_flag staticimplib $ac_flags then @@ -432,21 +443,7 @@ wine_fn_config_program () AS_VAR_IF([$ac_enable],[no],,[wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "$ac_dir: __builddeps__" - if test "x$enable_maintainer_mode" = xyes - then - 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_pot_rules $ac_dir $ac_flags wine_fn_has_flag install $ac_flags || return wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ diff --git a/configure b/configure index 8cfccff33a4..2163c840fdd 100755 --- a/configure +++ b/configure @@ -14224,6 +14224,31 @@ $ac_dir/__depend__: $ac_makedep dummy @./config.status --file $ac_dir/Makefile:$ac_input && cd $ac_dir && \$(MAKE) depend" } +wine_fn_pot_rules () +{ + ac_dir=$1 + ac_flags=$2 + + test "x$enable_maintainer_mode" = xyes || return + + 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/Makefile dummy + @cd $ac_dir && \$(MAKE) msg.pot +$ac_dir/msg.pot: tools/wmc include" + 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/Makefile dummy + @cd $ac_dir && \$(MAKE) rsrc.pot +$ac_dir/srsrc.pot: tools/wrc include" + fi +} + wine_fn_config_makefile () { ac_dir=$1 @@ -14348,21 +14373,7 @@ $ac_dir/__uninstall__:: fi fi - if test "x$enable_maintainer_mode" = xyes - then - 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_pot_rules $ac_dir $ac_flags fi if wine_fn_has_flag staticimplib $ac_flags @@ -14462,21 +14473,7 @@ else wine_fn_append_rule ALL_MAKEFILE_DEPENDS \ "$ac_dir: __builddeps__" - if test "x$enable_maintainer_mode" = xyes - then - 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_pot_rules $ac_dir $ac_flags wine_fn_has_flag install $ac_flags || return wine_fn_append_rule ALL_MAKEFILE_DEPENDS \