1
# Makefile for program source directory in GNU NLS utilities package.
2
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
3
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
5
# This file may be copied and used freely without restrictions. It may
6
# be used in projects which are not available under a GNU Public License,
7
# but which still want to provide support for the GNU gettext functionality.
9
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
10
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
12
# - Modified by jacob berkman <jacob@ximian.com> to install
13
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
15
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
17
# We have the following line for use by intltoolize:
1
# Makefile for PO directory in any package using GNU gettext.
2
# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
4
# Copying and distribution of this file, with or without modification,
5
# are permitted in any medium without royalty provided the copyright
6
# notice and this notice are preserved. This file is offered as-is,
7
# without any warranty.
9
# Origin: gettext-0.19.7
10
GETTEXT_MACRO_VERSION = 0.19
20
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
21
12
PACKAGE = @PACKAGE@
22
13
VERSION = @VERSION@
14
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
27
21
top_srcdir = @top_srcdir@
28
top_builddir = @top_builddir@
32
25
exec_prefix = @exec_prefix@
26
datarootdir = @datarootdir@
33
27
datadir = @datadir@
34
datarootdir = @datarootdir@
36
28
localedir = @localedir@
38
install_sh = @install_sh@
39
# Automake >= 1.8 provides @mkdir_p@.
40
# Until it can be supposed, use the safe fallback:
41
mkdir_p = $(install_sh) -d
29
gettextsrcdir = $(datadir)/gettext/po
43
31
INSTALL = @INSTALL@
44
32
INSTALL_DATA = @INSTALL_DATA@
48
XGETTEXT_ARGS = @XGETTEXT_ARGS@
49
XGETTEXT = @XGETTEXT@ $(XGETTEXT_ARGS)
50
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
51
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
52
MSGMERGE = XGETTEXT_ARGS="$(XGETTEXT_ARGS)" INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
53
GENPOT = XGETTEXT_ARGS="$(XGETTEXT_ARGS)" INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
55
ALL_LINGUAS = @ALL_LINGUAS@
57
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
59
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
61
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
63
POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
65
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
66
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
35
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
36
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
37
# @install_sh@ does not start with $(SHELL), so we add it.
38
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
39
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
40
# versions, $(mkinstalldirs) and $(install_sh) are unused.
41
mkinstalldirs = $(SHELL) @install_sh@ -d
42
install_sh = $(SHELL) @install_sh@
46
# When building gettext-tools, we prefer to use the built programs
47
# rather than installed programs. However, we can't do that when we
48
# are cross compiling.
49
CROSS_COMPILING = @CROSS_COMPILING@
52
GMSGFMT_no = @GMSGFMT@
53
GMSGFMT_yes = @GMSGFMT_015@
54
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
57
MSGFMT_yes = @MSGFMT_015@
58
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
59
XGETTEXT_ = @XGETTEXT@
60
XGETTEXT_no = @XGETTEXT@
61
XGETTEXT_yes = @XGETTEXT_015@
62
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
64
MSGMERGE_UPDATE = @MSGMERGE@ --update
71
UPDATEPOFILES = @UPDATEPOFILES@
72
DUMMYPOFILES = @DUMMYPOFILES@
73
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
74
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
75
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
76
$(POFILES) $(GMOFILES) \
77
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
69
# This comment gets stripped out
71
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
83
POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
84
POFILESDEPS_yes = $(POFILESDEPS_)
86
POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
88
DISTFILESDEPS_ = update-po
89
DISTFILESDEPS_yes = $(DISTFILESDEPS_)
91
DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
93
# Makevars gets inserted here. (Don't remove this line!)
74
.SUFFIXES: .po .pox .gmo .mo .msg .cat
76
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
77
INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
78
INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
79
INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@;
82
$(MAKE) $(GETTEXT_PACKAGE).pot
83
$(MSGMERGE) $* $(GETTEXT_PACKAGE).pot -o $*.pox
96
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
86
$(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
99
@echo "$(MSGFMT) -c -o $@ $<"; \
100
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
89
$(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
90
&& rm -f $$file && $(GMSGFMT) -o $$file $<
103
@lang=`echo $* | sed -e 's,.*/,,'`; \
104
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
105
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
106
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
93
sed -f ../intl/po2msg.sed < $< > $*.msg \
94
&& rm -f $@ && gencat $@ $*.msg
109
sed -e '/^#/d' $< > t-$@
97
113
all: all-@USE_NLS@
102
$(GETTEXT_PACKAGE).pot: $(POTFILES)
105
install: install-data
118
# Ensure that the gettext macros and this Makefile.in.in are in sync.
119
CHECK_MACRO_VERSION = \
120
test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
121
|| { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
125
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
126
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
127
# we don't want to bother translators with empty POT files). We assume that
128
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
129
# In this case, stamp-po is a nop (i.e. a phony target).
131
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
132
# been loosely updated. Its purpose is that when a developer or translator
133
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
134
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
135
# invocations of "make" will do nothing. This timestamp would not be necessary
136
# if updating the $(CATALOGS) would always touch them; however, the rule for
137
# $(POFILES) has been designed to not touch files that don't need to be
139
stamp-po: $(srcdir)/$(DOMAIN).pot
140
@$(CHECK_MACRO_VERSION)
141
test ! -f $(srcdir)/$(DOMAIN).pot || \
142
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
143
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
144
echo "touch stamp-po" && \
145
echo timestamp > stamp-poT && \
146
mv stamp-poT stamp-po; \
149
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
150
# otherwise packages like GCC can not be built if only parts of the source
151
# have been downloaded.
153
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
154
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
155
# The determination of whether the package xyz is a GNU one is based on the
156
# heuristic whether some file in the top level directory mentions "GNU xyz".
157
# If GNU 'find' is available, we avoid grepping through monster files.
158
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
159
package_gnu="$(PACKAGE_GNU)"; \
160
test -n "$$package_gnu" || { \
161
if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
162
LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
163
-size -10000000c -exec grep 'GNU @PACKAGE@' \
164
/dev/null '{}' ';' 2>/dev/null; \
166
LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
168
} | grep -v 'libtool:' >/dev/null; then \
174
if test "$$package_gnu" = "yes"; then \
175
package_prefix='GNU '; \
179
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
180
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
182
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
184
case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
185
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
186
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
187
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
188
--files-from=$(srcdir)/POTFILES.in \
189
--copyright-holder='$(COPYRIGHT_HOLDER)' \
190
--msgid-bugs-address="$$msgid_bugs_address" \
193
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
194
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
195
--files-from=$(srcdir)/POTFILES.in \
196
--copyright-holder='$(COPYRIGHT_HOLDER)' \
197
--package-name="$${package_prefix}@PACKAGE@" \
198
--package-version='@VERSION@' \
199
--msgid-bugs-address="$$msgid_bugs_address" \
202
test ! -f $(DOMAIN).po || { \
203
if test -f $(srcdir)/$(DOMAIN).pot-header; then \
204
sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
205
cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
206
rm -f $(DOMAIN).1po; \
208
if test -f $(srcdir)/$(DOMAIN).pot; then \
209
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
210
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
211
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
212
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
214
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
215
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
218
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
222
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
223
# every "make" invocation, only create it when it is missing.
224
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
225
$(srcdir)/$(DOMAIN).pot:
226
$(MAKE) $(DOMAIN).pot-update
228
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
229
# Note that a PO file is not touched if it doesn't need to be changed.
230
$(POFILES): $(POFILESDEPS)
231
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
232
if test -f "$(srcdir)/$${lang}.po"; then \
233
test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
234
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
235
echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
237
&& { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
238
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
239
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
241
$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
245
$(MAKE) $${lang}.po-create; \
249
install: install-exec install-data
106
251
install-data: install-data-@USE_NLS@
252
if test "$(PACKAGE)" = "gettext-tools"; then \
253
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
254
for file in $(DISTFILES.common) Makevars.template; do \
255
$(INSTALL_DATA) $(srcdir)/$$file \
256
$(DESTDIR)$(gettextsrcdir)/$$file; \
258
for file in Makevars; do \
259
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
107
264
install-data-no: all
108
265
install-data-yes: all
109
linguas="$(USE_LINGUAS)"; \
110
for lang in $$linguas; do \
111
dir=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES; \
113
if test -r $$lang.gmo; then \
114
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
115
echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
117
$(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
118
echo "installing $(srcdir)/$$lang.gmo as" \
119
"$$dir/$(GETTEXT_PACKAGE).mo"; \
121
if test -r $$lang.gmo.m; then \
122
$(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
123
echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
125
if test -r $(srcdir)/$$lang.gmo.m ; then \
126
$(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
127
$$dir/$(GETTEXT_PACKAGE).mo.m; \
128
echo "installing $(srcdir)/$$lang.gmo.m as" \
129
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
136
# Empty stubs to satisfy archaic automake needs
137
dvi info ctags tags CTAGS TAGS ID:
266
@catalogs='$(CATALOGS)'; \
267
for cat in $$catalogs; do \
268
cat=`basename $$cat`; \
269
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
270
dir=$(localedir)/$$lang/LC_MESSAGES; \
271
$(mkdir_p) $(DESTDIR)$$dir; \
272
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
273
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
274
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
275
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
276
if test -n "$$lc"; then \
277
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
278
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
279
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
280
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
281
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
283
if test -f $$file; then \
284
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
287
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
289
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
292
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
293
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
296
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
297
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
298
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
299
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
300
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
305
install-strip: install
307
installdirs: installdirs-exec installdirs-data
309
installdirs-data: installdirs-data-@USE_NLS@
310
if test "$(PACKAGE)" = "gettext-tools"; then \
311
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
316
installdirs-data-yes:
317
@catalogs='$(CATALOGS)'; \
318
for cat in $$catalogs; do \
319
cat=`basename $$cat`; \
320
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
321
dir=$(localedir)/$$lang/LC_MESSAGES; \
322
$(mkdir_p) $(DESTDIR)$$dir; \
323
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
324
if test -n "$$lc"; then \
325
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
326
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
327
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
328
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
329
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
331
if test -f $$file; then \
332
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
335
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
337
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
340
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
341
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
139
348
# Define this as empty until I found a useful application.
140
install-exec installcheck:
143
linguas="$(USE_LINGUAS)"; \
144
for lang in $$linguas; do \
145
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
146
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
351
uninstall: uninstall-exec uninstall-data
353
uninstall-data: uninstall-data-@USE_NLS@
354
if test "$(PACKAGE)" = "gettext-tools"; then \
355
for file in $(DISTFILES.common) Makevars.template; do \
356
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
363
catalogs='$(CATALOGS)'; \
364
for cat in $$catalogs; do \
365
cat=`basename $$cat`; \
366
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
367
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
368
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
149
check: all $(GETTEXT_PACKAGE).pot
150
rm -f missing notexist
151
srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
152
if [ -r missing -o -r notexist ]; then \
374
info dvi ps pdf html tags TAGS ctags CTAGS ID:
157
rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
158
rm -f .intltool-merge-cache
377
rm -f remove-potcdate.sed
379
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
160
382
clean: mostlyclean
163
rm -f Makefile Makefile.in POTFILES stamp-it
164
rm -f *.mo *.msg *.cat *.cat.m *.gmo
385
rm -f Makefile Makefile.in POTFILES *.mo
166
387
maintainer-clean: distclean
167
388
@echo "This command is intended for maintainers to use;"
168
389
@echo "it deletes files that may require special tools to rebuild."
390
rm -f stamp-po $(GMOFILES)
171
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
172
dist distdir: $(DISTFILES)
392
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
394
test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
396
# This is a separate target because 'update-po' must be executed before.
397
dist2: stamp-po $(DISTFILES)
173
398
dists="$(DISTFILES)"; \
174
extra_dists="$(EXTRA_DISTFILES)"; \
175
for file in $$extra_dists; do \
176
test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
399
if test "$(PACKAGE)" = "gettext-tools"; then \
400
dists="$$dists Makevars.template"; \
402
if test -f $(srcdir)/$(DOMAIN).pot; then \
403
dists="$$dists $(DOMAIN).pot stamp-po"; \
405
if test -f $(srcdir)/ChangeLog; then \
406
dists="$$dists ChangeLog"; \
408
for i in 0 1 2 3 4 5 6 7 8 9; do \
409
if test -f $(srcdir)/ChangeLog.$$i; then \
410
dists="$$dists ChangeLog.$$i"; \
413
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
178
414
for file in $$dists; do \
179
test -f $$file || file="$(srcdir)/$$file"; \
180
ln $$file $(distdir) 2> /dev/null \
181
|| cp -p $$file $(distdir); \
415
if test -f $$file; then \
416
cp -p $$file $(distdir) || exit 1; \
418
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
184
422
update-po: Makefile
185
$(MAKE) $(GETTEXT_PACKAGE).pot
423
$(MAKE) $(DOMAIN).pot-update
424
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
427
# General rule for creating PO files.
430
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
431
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
434
# General rule for updating PO files.
437
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
438
if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
187
linguas="$(USE_LINGUAS)"; \
188
for lang in $$linguas; do \
190
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
192
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
193
rm -f $$tmpdir/$$lang.new.po; \
195
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
198
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
199
rm -f $$tmpdir/$$lang.new.po; \
204
echo "msgmerge for $$lang.gmo failed!"; \
441
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
442
echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
444
if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
445
'' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
446
$(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
448
$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
451
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
205
452
rm -f $$tmpdir/$$lang.new.po; \
454
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
457
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
209
Makefile POTFILES: stamp-it
210
@if test ! -f $@; then \
462
echo "msgmerge for $$lang.po failed!" 1>&2; \
463
rm -f $$tmpdir/$$lang.new.po; \
215
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
468
update-gmo: Makefile $(GMOFILES)
471
# Recreate Makefile by invoking config.status. Explicitly invoke the shell,
472
# because execution permission bits may not work on the current file system.
473
# Use @SHELL@, which is the shell determined by autoconf for the use by its
474
# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
475
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
216
476
cd $(top_builddir) \
217
&& CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
218
$(SHELL) ./config.status
477
&& @SHELL@ ./config.status $(subdir)/$@.in po-directories
220
481
# Tell versions [3.59,3.63) of GNU make not to export all variables.
221
482
# Otherwise a system limit (for SysV at least) may be exceeded.