~ubuntu-branches/debian/experimental/intltool/experimental

« back to all changes in this revision

Viewing changes to intltool-po-Makefile.in.in-patch-4

  • Committer: Bazaar Package Importer
  • Author(s): Takuo KITAME
  • Date: 2002-04-01 06:35:32 UTC
  • Revision ID: james.westby@ubuntu.com-20020401063532-bw4twe4jtac366wp
Tags: upstream-0.18
ImportĀ upstreamĀ versionĀ 0.18

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- Makefile.in.in.clean        Wed Oct 17 16:15:24 2001
 
2
+++ Makefile.in.in      Wed Oct 17 16:15:30 2001
 
3
@@ -14,6 +14,7 @@
 
4
 
 
5
 srcdir = @srcdir@
 
6
 top_srcdir = @top_srcdir@
 
7
+top_builddir = ..
 
8
 VPATH = @srcdir@
 
9
 
 
10
 prefix = @prefix@
 
11
@@ -38,7 +39,10 @@
 
12
 GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
 
13
 MSGFMT = @MSGFMT@
 
14
 XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
 
15
-MSGMERGE = PATH=../src:$$PATH msgmerge
 
16
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 
17
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 
18
+MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
 
19
+GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
 
20
 
 
21
 DEFS = @DEFS@
 
22
 CFLAGS = @CFLAGS@
 
23
@@ -88,12 +92,7 @@
 
24
 all-no:
 
25
 
 
26
 $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
 
27
-       $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
 
28
-         --add-comments --keyword=_ --keyword=N_ \
 
29
-         --files-from=$(srcdir)/POTFILES.in \
 
30
-       && test ! -f $(GETTEXT_PACKAGE).po \
 
31
-          || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
 
32
-               && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
 
33
+       $(GENPOT)
 
34
 
 
35
 $(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
 
36
 $(srcdir)/stamp-cat-id: $(GETTEXT_PACKAGE).pot
 
37
@@ -219,9 +218,9 @@
 
38
        for cat in $$catalogs; do \
 
39
          cat=`basename $$cat`; \
 
40
          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
 
41
-         mv $$lang.po $$lang.old.po; \
 
42
+         cp $$lang.po $$lang.old.po; \
 
43
          echo "$$lang:"; \
 
44
-         if $(MSGMERGE) $$lang.old.po $(GETTEXT_PACKAGE).pot -o $$lang.po; then \
 
45
+         if $(MSGMERGE) $$lang; then \
 
46
            rm -f $$lang.old.po; \
 
47
          else \
 
48
            echo "msgmerge for $$cat failed!"; \
 
49
@@ -230,6 +229,19 @@
 
50
          fi; \
 
51
        done
 
52
 
 
53
+.po: Makefile
 
54
+       $(MAKE)  $(PACKAGE).pot;
 
55
+       PATH=`pwd`/../src:$$PATH; \
 
56
+       echo; printf "$*: "; \
 
57
+       if $(MSGMERGE) $*; then \
 
58
+         rm -f $*.old.po; \
 
59
+         else \
 
60
+           echo "msgmerge for * failed!"; \
 
61
+           mv $*.old.po $*.po; \
 
62
+       fi; \
 
63
+       msgfmt --statistics $*.po; echo;
 
64
+
 
65
+
 
66
 # POTFILES is created from POTFILES.in by stripping comments, empty lines
 
67
 # and Intltool tags (enclosed in square brackets), and appending a full
 
68
 # relative path to them