annotate po/Makefile.in.in @ 1062:1d65dcdb714c trunk

[svn] - bump version of plugins and version requirements per plugin api v2
author nenolod
date Thu, 24 May 2007 02:12:43 -0700
parents 6bb98fbbae04
children 828fa2348ac9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
1 # Makefile for PO directory in any package using GNU gettext.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
2 # Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
3 #
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
4 # This file can be copied and used freely without restrictions. It can
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
5 # be used in projects which are not available under the GNU General Public
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
6 # License but which still want to provide support for the GNU gettext
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
7 # functionality.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
8 # Please note that the actual code of GNU gettext is covered by the GNU
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
9 # General Public License and is *not* in the public domain.
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
10 #
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
11 # Origin: gettext-0.14.4
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
12
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
13 PACKAGE = @PACKAGE@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
14 VERSION = @VERSION@
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
15 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
16
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
17 SHELL = /bin/sh
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
18 @SET_MAKE@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
19
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
20 srcdir = @srcdir@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
21 top_srcdir = @top_srcdir@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
22 VPATH = @srcdir@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
23
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
24 prefix = @prefix@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
25 exec_prefix = @exec_prefix@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
26 datadir = @datadir@
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
27 localedir = $(datadir)/locale
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
28 gettextsrcdir = $(datadir)/gettext/po
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
29
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
30 INSTALL = @INSTALL@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
31 INSTALL_DATA = @INSTALL_DATA@
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
32 MKINSTALLDIRS = @MKINSTALLDIRS@
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
33 mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
34
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
35 GMSGFMT = @GMSGFMT@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
36 MSGFMT = @MSGFMT@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
37 XGETTEXT = @XGETTEXT@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
38 MSGMERGE = msgmerge
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
39 MSGMERGE_UPDATE = @MSGMERGE@ --update
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
40 MSGINIT = msginit
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
41 MSGCONV = msgconv
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
42 MSGFILTER = msgfilter
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
43
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
44 POFILES = @POFILES@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
45 GMOFILES = @GMOFILES@
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
46 UPDATEPOFILES = @UPDATEPOFILES@
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
47 DUMMYPOFILES = @DUMMYPOFILES@
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
48 DISTFILES.common = Makefile.in.in remove-potcdate.sin \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
49 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
50 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
51 $(POFILES) $(GMOFILES) \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
52 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
53
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
54 POTFILES = \
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
55
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
56 CATALOGS = @CATALOGS@
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
57
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
58 # Makevars gets inserted here. (Don't remove this line!)
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
59
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
60 .SUFFIXES:
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
61 .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
62
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
63 .po.mo:
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
64 @echo "$(MSGFMT) -c -o $@ $<"; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
65 $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
66
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
67 .po.gmo:
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
68 @lang=`echo $* | sed -e 's,.*/,,'`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
69 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
70 echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
71 cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
72
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
73 .sin.sed:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
74 sed -e '/^#/d' $< > t-$@
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
75 mv t-$@ $@
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
76
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
77
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
78 all: all-@USE_NLS@
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
79
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
80 all-yes: stamp-po
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
81 all-no:
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
82
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
83 # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
84 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
85 # we don't want to bother translators with empty POT files). We assume that
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
86 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
87 # In this case, stamp-po is a nop (i.e. a phony target).
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
88
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
89 # stamp-po is a timestamp denoting the last time at which the CATALOGS have
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
90 # been loosely updated. Its purpose is that when a developer or translator
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
91 # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
92 # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
93 # invocations of "make" will do nothing. This timestamp would not be necessary
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
94 # if updating the $(CATALOGS) would always touch them; however, the rule for
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
95 # $(POFILES) has been designed to not touch files that don't need to be
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
96 # changed.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
97 stamp-po: $(srcdir)/$(DOMAIN).pot
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
98 test ! -f $(srcdir)/$(DOMAIN).pot || \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
99 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
100 @test ! -f $(srcdir)/$(DOMAIN).pot || { \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
101 echo "touch stamp-po" && \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
102 echo timestamp > stamp-poT && \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
103 mv stamp-poT stamp-po; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
104 }
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
105
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
106 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
107 # otherwise packages like GCC can not be built if only parts of the source
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
108 # have been downloaded.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
109
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
110 # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
111 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
112 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
113 if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
114 msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
115 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
116 msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
117 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
118 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
119 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
120 --files-from=$(srcdir)/POTFILES.in \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
121 --copyright-holder='$(COPYRIGHT_HOLDER)' \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
122 --msgid-bugs-address="$$msgid_bugs_address"
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
123 test ! -f $(DOMAIN).po || { \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
124 if test -f $(srcdir)/$(DOMAIN).pot; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
125 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
126 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
127 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
128 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
129 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
130 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
131 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
132 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
133 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
134 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
135 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
136 }
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
137
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
138 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
139 # every "make" invocation, only create it when it is missing.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
140 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
141 $(srcdir)/$(DOMAIN).pot:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
142 $(MAKE) $(DOMAIN).pot-update
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
143
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
144 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
145 # Note that a PO file is not touched if it doesn't need to be changed.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
146 $(POFILES): $(srcdir)/$(DOMAIN).pot
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
147 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
148 if test -f "$(srcdir)/$${lang}.po"; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
149 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
150 echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
151 cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
152 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
153 $(MAKE) $${lang}.po-create; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
154 fi
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
155
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
156
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
157 install: install-exec install-data
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
158 install-exec:
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
159 install-data: install-data-@USE_NLS@
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
160 if test "$(PACKAGE)" = "gettext-tools"; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
161 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
162 for file in $(DISTFILES.common) Makevars.template; do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
163 $(INSTALL_DATA) $(srcdir)/$$file \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
164 $(DESTDIR)$(gettextsrcdir)/$$file; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
165 done; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
166 for file in Makevars; do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
167 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
168 done; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
169 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
170 : ; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
171 fi
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
172 install-data-no: all
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
173 install-data-yes: all
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
174 $(mkinstalldirs) $(DESTDIR)$(datadir)
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
175 @catalogs='$(CATALOGS)'; \
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
176 for cat in $$catalogs; do \
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
177 cat=`basename $$cat`; \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
178 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
179 dir=$(localedir)/$$lang/LC_MESSAGES; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
180 $(mkinstalldirs) $(DESTDIR)$$dir; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
181 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
182 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
183 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
184 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
185 if test -n "$$lc"; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
186 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
187 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
188 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
189 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
190 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
191 for file in *; do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
192 if test -f $$file; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
193 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
194 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
195 done); \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
196 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
197 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
198 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
199 :; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
200 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
201 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
202 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
203 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
204 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
205 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
206 ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
207 ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
208 cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
209 echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
210 fi; \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
211 done; \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
212 done
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
213
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
214 install-strip: install
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
215
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
216 installdirs: installdirs-exec installdirs-data
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
217 installdirs-exec:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
218 installdirs-data: installdirs-data-@USE_NLS@
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
219 if test "$(PACKAGE)" = "gettext-tools"; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
220 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
221 else \
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
222 : ; \
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
223 fi
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
224 installdirs-data-no:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
225 installdirs-data-yes:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
226 $(mkinstalldirs) $(DESTDIR)$(datadir)
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
227 @catalogs='$(CATALOGS)'; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
228 for cat in $$catalogs; do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
229 cat=`basename $$cat`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
230 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
231 dir=$(localedir)/$$lang/LC_MESSAGES; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
232 $(mkinstalldirs) $(DESTDIR)$$dir; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
233 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
234 if test -n "$$lc"; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
235 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
236 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
237 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
238 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
239 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
240 for file in *; do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
241 if test -f $$file; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
242 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
243 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
244 done); \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
245 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
246 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
247 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
248 :; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
249 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
250 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
251 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
252 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
253 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
254 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
255 done; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
256 done
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
257
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
258 # Define this as empty until I found a useful application.
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
259 installcheck:
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
260
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
261 uninstall: uninstall-exec uninstall-data
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
262 uninstall-exec:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
263 uninstall-data: uninstall-data-@USE_NLS@
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
264 if test "$(PACKAGE)" = "gettext-tools"; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
265 for file in $(DISTFILES.common) Makevars.template; do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
266 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
267 done; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
268 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
269 : ; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
270 fi
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
271 uninstall-data-no:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
272 uninstall-data-yes:
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
273 catalogs='$(CATALOGS)'; \
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
274 for cat in $$catalogs; do \
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
275 cat=`basename $$cat`; \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
276 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
277 for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
278 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
279 done; \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
280 done
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
281
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
282 check: all
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
283
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
284 info dvi ps pdf html tags TAGS ctags CTAGS ID:
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
285
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
286 mostlyclean:
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
287 rm -f remove-potcdate.sed
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
288 rm -f stamp-poT
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
289 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
290 rm -fr *.o
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
291
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
292 clean: mostlyclean
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
293
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
294 distclean: clean
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
295 rm -f Makefile Makefile.in POTFILES *.mo
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
296
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
297 maintainer-clean: distclean
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
298 @echo "This command is intended for maintainers to use;"
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
299 @echo "it deletes files that may require special tools to rebuild."
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
300 rm -f stamp-po $(GMOFILES)
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
301
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
302 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
303 dist distdir:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
304 $(MAKE) update-po
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
305 @$(MAKE) dist2
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
306 # This is a separate target because 'update-po' must be executed before.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
307 dist2: stamp-po $(DISTFILES)
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
308 dists="$(DISTFILES)"; \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
309 if test "$(PACKAGE)" = "gettext-tools"; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
310 dists="$$dists Makevars.template"; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
311 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
312 if test -f $(srcdir)/$(DOMAIN).pot; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
313 dists="$$dists $(DOMAIN).pot stamp-po"; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
314 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
315 if test -f $(srcdir)/ChangeLog; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
316 dists="$$dists ChangeLog"; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
317 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
318 for i in 0 1 2 3 4 5 6 7 8 9; do \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
319 if test -f $(srcdir)/ChangeLog.$$i; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
320 dists="$$dists ChangeLog.$$i"; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
321 fi; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
322 done; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
323 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
324 for file in $$dists; do \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
325 if test -f $$file; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
326 cp -p $$file $(distdir) || exit 1; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
327 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
328 cp -p $(srcdir)/$$file $(distdir) || exit 1; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
329 fi; \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
330 done
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
331
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
332 update-po: Makefile
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
333 $(MAKE) $(DOMAIN).pot-update
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
334 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
335 $(MAKE) update-gmo
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
336
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
337 # General rule for creating PO files.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
338
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
339 .nop.po-create:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
340 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
341 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
342 exit 1
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
343
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
344 # General rule for updating PO files.
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
345
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
346 .nop.po-update:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
347 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
348 if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
349 tmpdir=`pwd`; \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
350 echo "$$lang:"; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
351 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
352 echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
353 cd $(srcdir); \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
354 if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
355 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
356 rm -f $$tmpdir/$$lang.new.po; \
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
357 else \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
358 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
359 :; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
360 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
361 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
362 exit 1; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
363 fi; \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
364 fi; \
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
365 else \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
366 echo "msgmerge for $$lang.po failed!" 1>&2; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
367 rm -f $$tmpdir/$$lang.new.po; \
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
368 fi
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
369
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
370 $(DUMMYPOFILES):
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
371
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
372 update-gmo: Makefile $(GMOFILES)
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
373 @:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
374
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
375 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
376 cd $(top_builddir) \
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
377 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
378 $(SHELL) ./config.status
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
379
390
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
380 force:
6bb98fbbae04 [svn] - translation framework
nenolod
parents: 389
diff changeset
381
389
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
382 # Tell versions [3.59,3.63) of GNU make not to export all variables.
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
383 # Otherwise a system limit (for SysV at least) may be exceeded.
8ab5fa857f33 [svn] - add infrastructure for plugin i18n
nenolod
parents:
diff changeset
384 .NOEXPORT: