Alexandre Julliard : makefiles: Generate explicit rules for building mo files.

Alexandre Julliard julliard at winehq.org
Mon Nov 11 14:08:15 CST 2013


Module: wine
Branch: master
Commit: 7f8412f253866c1910566c4fe130f76f20fc0d85
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7f8412f253866c1910566c4fe130f76f20fc0d85

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Nov 11 11:46:04 2013 +0100

makefiles: Generate explicit rules for building mo files.

---

 Make.rules.in |    7 ++-----
 configure     |    8 ++++++++
 configure.ac  |    9 +++++++++
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/Make.rules.in b/Make.rules.in
index d9c9827..a853afe 100644
--- a/Make.rules.in
+++ b/Make.rules.in
@@ -20,7 +20,7 @@ RCFLAGS      = --nostdinc $(PORCFLAGS) $(TARGETFLAGS) $(INCLUDES) $(DEFS) $(EXTR
 IDL_GEN_C_SRCS  = $(IDL_C_SRCS:.idl=_c.c) $(IDL_I_SRCS:.idl=_i.c) \
                   $(IDL_P_SRCS:.idl=_p.c) $(IDL_S_SRCS:.idl=_s.c)
 
-CLEAN_FILES   = *.o *.a *.so *.mo *.res *.fake *.ok *.tab.[ch] *.yy.c
+CLEAN_FILES   = *.o *.a *.so *.res *.fake *.ok *.tab.[ch] *.yy.c
 CLEAN_TARGETS = $(MODULE) $(IMPORTLIB:%=lib%. at IMPLIBEXT@) $(XTEMPLATE_SRCS:.x=.h) \
                 $(TESTMODULE) $(TESTMODULE_STRIPPED) $(CROSSTESTMODULE)
 
@@ -32,7 +32,7 @@ ALLCROSSCFLAGS = $(INCLUDES) $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS)
 
 # Implicit rules
 
-.SUFFIXES: .ok .man.in .man .po .mo @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp
+.SUFFIXES: .ok .man.in .man @MAINTAINER_MODE@ .sfd .ttf .svg .ico .bmp
 
 .c.ok:
 	$(RUNTEST) $(RUNTESTFLAGS) $< && touch $@
@@ -49,9 +49,6 @@ ALLCROSSCFLAGS = $(INCLUDES) $(DEFS) -DWINE_CROSSTEST $(CPPFLAGS) $(CFLAGS)
 .svg.bmp:
 	CONVERT="$(CONVERT)" ICOTOOL="$(ICOTOOL)" RSVG="$(RSVG)" $(BUILDIMAGE) $< $@
 
-.po.mo:
-	$(MSGFMT) -o $@ $<
-
 # Rules for main module
 
 $(MODULE) $(MODULE:%=%.so) $(MODULE:%=%.fake): $(MAINSPEC) $(OBJS) Makefile.in
diff --git a/configure b/configure
index 5dd4a59..663de64 100755
--- a/configure
+++ b/configure
@@ -17428,6 +17428,14 @@ then
     wine_fn_append_rule "__builddeps__: \$(ALL_MO_FILES)
 clean::
 	\$(RM) \$(ALL_MO_FILES)"
+
+    posrc="po"
+    test "$srcdir" = . || posrc="$srcdir/po"
+    for i in $LINGUAS
+    do
+        wine_fn_append_rule "po/$i.mo: $posrc/$i.po
+	\$(MSGFMT) -o \$@ $posrc/$i.po"
+    done
 else
     LINGUAS=
 fi
diff --git a/configure.ac b/configure.ac
index 8bbbac5..98220b2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3489,6 +3489,15 @@ then
 [__builddeps__: \$(ALL_MO_FILES)
 clean::
 	\$(RM) \$(ALL_MO_FILES)])
+
+    posrc="po"
+    test "$srcdir" = . || posrc="$srcdir/po"
+    for i in $LINGUAS
+    do
+        WINE_APPEND_RULE(
+[po/$i.mo: $posrc/$i.po
+	\$(MSGFMT) -o \$@ $posrc/$i.po])
+    done
 else
     LINGUAS=
 fi




More information about the wine-cvs mailing list