annotate po/Makefile.in.in @ 3203:f5456241bff9 default tip

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