1
# Makefile for PO directory in any package using GNU gettext.
2
# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
4
# This file can be copied and used freely without restrictions. It can
5
# be used in projects which are not available under the GNU General Public
6
# License but which still want to provide support for the GNU gettext
8
# Please note that the actual code of GNU gettext is covered by the GNU
9
# General Public License and is *not* in the public domain.
11
# Origin: gettext-0.15
25
exec_prefix = ${prefix}
26
datarootdir = ${prefix}/share
27
datadir = ${datarootdir}
28
localedir = ${datarootdir}/locale
29
gettextsrcdir = $(datadir)/gettext/po
31
INSTALL = /usr/bin/install -c
32
INSTALL_DATA = ${INSTALL} -m 644
33
mkinstalldirs = $(SHELL) ${SHELL} /tmp/ripperX-build-2.7.3/ripperX-2.7.3/config/install-sh -d
34
mkdir_p = /bin/mkdir -p
36
GMSGFMT_ = /usr/bin/msgfmt
37
GMSGFMT_no = /usr/bin/msgfmt
38
GMSGFMT_yes = /usr/bin/msgfmt
39
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
40
MSGFMT_ = /usr/bin/msgfmt
41
MSGFMT_no = /usr/bin/msgfmt
42
MSGFMT_yes = /usr/bin/msgfmt
43
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
44
XGETTEXT_ = /usr/bin/xgettext
45
XGETTEXT_no = /usr/bin/xgettext
46
XGETTEXT_yes = /usr/bin/xgettext
47
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
49
MSGMERGE_UPDATE = /usr/bin/msgmerge --update
54
POFILES = en_GB.po es.po it.po gl.po de.po
55
GMOFILES = en_GB.gmo es.gmo it.gmo gl.gmo de.gmo
56
UPDATEPOFILES = en_GB.po-update es.po-update it.po-update gl.po-update de.po-update
57
DUMMYPOFILES = en_GB.nop es.nop it.nop gl.nop de.nop
58
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
59
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
60
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
61
$(POFILES) $(GMOFILES) \
62
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
67
../src/config_window_handler.c \
68
../src/dir_window_handler.c \
69
../src/err_dialog_handler.c \
70
../src/job_control.c \
71
../src/main_window_handler.c \
73
../src/players_manipulation.c \
74
../src/ripper_encoder_manipulation.c \
75
../src/select_frame_handler.c \
76
../src/status_frame_handler.c
78
CATALOGS = en_GB.gmo es.gmo it.gmo gl.gmo de.gmo
80
# Makevars gets inserted here. (Don't remove this line!)
81
# Makefile variables for PO directory in any package using GNU gettext.
83
# Usually the message domain is the same as the package name.
86
# These two variables depend on the location of this directory.
90
# These options get passed to xgettext.
92
--keyword=_ --flag=_:1:pass-c-format \
93
--keyword=Q_ --flag=Q_:1:pass-c-format \
94
--keyword=N_ --flag=N_:1:pass-c-format \
95
--keyword='proper_name:1,"This is a proper name. See the gettext manual, section Names."' \
96
--keyword='proper_name_utf8:1,"This is a proper name. See the gettext manual, section Names."' \
97
--flag=error:3:c-format --flag=error_at_line:5:c-format
99
# This is the copyright holder that gets inserted into the header of the
100
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
101
# package. (Note that the msgstr strings, extracted from the package's
102
# sources, belong to the copyright holder of the package.) Translators are
103
# expected to transfer the copyright for their translations to this person
104
# or entity, or to disclaim their copyright. The empty string stands for
105
# the public domain; in this case the translators are expected to disclaim
107
COPYRIGHT_HOLDER = ripperX
109
# This is the email address or URL to which the translators shall report
110
# bugs in the untranslated strings:
111
# - Strings which are not entire sentences, see the maintainer guidelines
112
# in the GNU gettext documentation, section 'Preparing Strings'.
113
# - Strings which use unclear terms or require additional context to be
115
# - Strings which make invalid assumptions about notation of date, time or
117
# - Pluralisation problems.
118
# - Incorrect English spelling.
119
# - Incorrect formatting.
120
# It can be your email address, or a mailing list address where translators
121
# can write to without being subscribed, or the URL of a web page through
122
# which the translators can contact you.
123
MSGID_BUGS_ADDRESS = tmancill@users.sourceforge.net
125
# This is the list of locale categories, beyond LC_MESSAGES, for which the
126
# message catalogs shall be used. It is usually empty.
127
EXTRA_LOCALE_CATEGORIES =
129
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
130
# context. Possible values are "yes" and "no". Set this to yes if the
131
# package uses functions taking also a message context, like pgettext(), or
132
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
136
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
139
@echo "$(MSGFMT) -c -o $@ $<"; \
140
$(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
143
@lang=`echo $* | sed -e 's,.*/,,'`; \
144
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
145
echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
146
cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
149
sed -e '/^#/d' $< > t-$@
158
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
159
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
160
# we don't want to bother translators with empty POT files). We assume that
161
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
162
# In this case, stamp-po is a nop (i.e. a phony target).
164
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
165
# been loosely updated. Its purpose is that when a developer or translator
166
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
167
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
168
# invocations of "make" will do nothing. This timestamp would not be necessary
169
# if updating the $(CATALOGS) would always touch them; however, the rule for
170
# $(POFILES) has been designed to not touch files that don't need to be
172
stamp-po: $(srcdir)/$(DOMAIN).pot
173
test ! -f $(srcdir)/$(DOMAIN).pot || \
174
test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
175
@test ! -f $(srcdir)/$(DOMAIN).pot || { \
176
echo "touch stamp-po" && \
177
echo timestamp > stamp-poT && \
178
mv stamp-poT stamp-po; \
181
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
182
# otherwise packages like GCC can not be built if only parts of the source
183
# have been downloaded.
185
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
186
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
187
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
188
if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
189
msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
191
msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
193
$(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
194
--add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
195
--files-from=$(srcdir)/POTFILES.in \
196
--copyright-holder='$(COPYRIGHT_HOLDER)' \
197
--msgid-bugs-address="$$msgid_bugs_address"
198
test ! -f $(DOMAIN).po || { \
199
if test -f $(srcdir)/$(DOMAIN).pot; then \
200
sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
201
sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
202
if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
203
rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
205
rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
206
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
209
mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
213
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
214
# every "make" invocation, only create it when it is missing.
215
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
216
$(srcdir)/$(DOMAIN).pot:
217
$(MAKE) $(DOMAIN).pot-update
219
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
220
# Note that a PO file is not touched if it doesn't need to be changed.
221
$(POFILES): $(srcdir)/$(DOMAIN).pot
222
@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
223
if test -f "$(srcdir)/$${lang}.po"; then \
224
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
225
echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
226
cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
228
$(MAKE) $${lang}.po-create; \
232
install: install-exec install-data
234
install-data: install-data-yes
235
if test "$(PACKAGE)" = "gettext-tools"; then \
236
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
237
for file in $(DISTFILES.common) Makevars.template; do \
238
$(INSTALL_DATA) $(srcdir)/$$file \
239
$(DESTDIR)$(gettextsrcdir)/$$file; \
241
for file in Makevars; do \
242
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
248
install-data-yes: all
249
$(mkdir_p) $(DESTDIR)$(datadir)
250
@catalogs='$(CATALOGS)'; \
251
for cat in $$catalogs; do \
252
cat=`basename $$cat`; \
253
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
254
dir=$(localedir)/$$lang/LC_MESSAGES; \
255
$(mkdir_p) $(DESTDIR)$$dir; \
256
if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
257
$(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
258
echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
259
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
260
if test -n "$$lc"; then \
261
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
262
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
263
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
264
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
265
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
267
if test -f $$file; then \
268
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
271
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
273
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
276
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
277
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
280
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
281
ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
282
ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
283
cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
284
echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
289
install-strip: install
291
installdirs: installdirs-exec installdirs-data
293
installdirs-data: installdirs-data-yes
294
if test "$(PACKAGE)" = "gettext-tools"; then \
295
$(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
300
installdirs-data-yes:
301
$(mkdir_p) $(DESTDIR)$(datadir)
302
@catalogs='$(CATALOGS)'; \
303
for cat in $$catalogs; do \
304
cat=`basename $$cat`; \
305
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
306
dir=$(localedir)/$$lang/LC_MESSAGES; \
307
$(mkdir_p) $(DESTDIR)$$dir; \
308
for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
309
if test -n "$$lc"; then \
310
if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
311
link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
312
mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
313
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
314
(cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
316
if test -f $$file; then \
317
ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
320
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
322
if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
325
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
326
mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
333
# Define this as empty until I found a useful application.
336
uninstall: uninstall-exec uninstall-data
338
uninstall-data: uninstall-data-yes
339
if test "$(PACKAGE)" = "gettext-tools"; then \
340
for file in $(DISTFILES.common) Makevars.template; do \
341
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
348
catalogs='$(CATALOGS)'; \
349
for cat in $$catalogs; do \
350
cat=`basename $$cat`; \
351
lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
352
for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
353
rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
359
info dvi ps pdf html tags TAGS ctags CTAGS ID:
362
rm -f remove-potcdate.sed
364
rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
370
rm -f Makefile Makefile.in POTFILES *.mo *.gmo
372
maintainer-clean: distclean
373
@echo "This command is intended for maintainers to use;"
374
@echo "it deletes files that may require special tools to rebuild."
375
rm -f stamp-po $(GMOFILES)
377
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
381
# This is a separate target because 'update-po' must be executed before.
382
dist2: stamp-po $(DISTFILES)
383
dists="$(DISTFILES)"; \
384
if test "$(PACKAGE)" = "gettext-tools"; then \
385
dists="$$dists Makevars.template"; \
387
if test -f $(srcdir)/$(DOMAIN).pot; then \
388
dists="$$dists $(DOMAIN).pot stamp-po"; \
390
if test -f $(srcdir)/ChangeLog; then \
391
dists="$$dists ChangeLog"; \
393
for i in 0 1 2 3 4 5 6 7 8 9; do \
394
if test -f $(srcdir)/ChangeLog.$$i; then \
395
dists="$$dists ChangeLog.$$i"; \
398
if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
399
for file in $$dists; do \
400
if test -f $$file; then \
401
cp -p $$file $(distdir) || exit 1; \
403
cp -p $(srcdir)/$$file $(distdir) || exit 1; \
408
$(MAKE) $(DOMAIN).pot-update
409
test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
412
# General rule for creating PO files.
415
@lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
416
echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
419
# General rule for updating PO files.
422
@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
423
if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
426
test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
427
echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
429
if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
430
if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
431
rm -f $$tmpdir/$$lang.new.po; \
433
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
436
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
441
echo "msgmerge for $$lang.po failed!" 1>&2; \
442
rm -f $$tmpdir/$$lang.new.po; \
447
update-gmo: Makefile $(GMOFILES)
450
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status POTFILES.in
452
&& $(SHELL) ./config.status $(subdir)/$@.in po-directories
456
# Tell versions [3.59,3.63) of GNU make not to export all variables.
457
# Otherwise a system limit (for SysV at least) may be exceeded.