• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/timemachine/gettext-0.17/gettext-tools/examples/po/
1## Makefile for the gettext-tools/examples/po subdirectory of GNU gettext
2## Copyright (C) 1995-1998, 2000-2007 Free Software Foundation, Inc.
3##
4## This program is free software: you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 3 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17## Process this file with automake to produce Makefile.in.
18
19AUTOMAKE_OPTIONS = 1.5 gnits
20
21# List of files which contain translatable strings.
22POTFILES = \
23  hello-c/hello.c \
24  hello-c-gnome/hello.c \
25  hello-c++/hello.cc \
26  hello-c++-qt/hello.cc \
27  hello-c++-kde/hello.cc \
28  hello-c++-kde/hellowindow.h \
29  hello-c++-kde/hellowindow.cc \
30  hello-c++-gnome/hello.cc \
31  hello-c++-wxwidgets/hello.cc \
32  hello-objc/hello.m \
33  hello-objc-gnustep/main.m \
34  hello-objc-gnustep/AppController.h \
35  hello-objc-gnustep/AppController.m \
36  hello-objc-gnustep/Hello.h \
37  hello-objc-gnustep/Hello.m \
38  hello-objc-gnome/hello.m \
39  hello-sh/hello.sh \
40  hello-python/hello.py.in \
41  hello-clisp/hello.lisp.in \
42  hello-librep/hello.jl.in \
43  hello-guile/hello.scm \
44  hello-smalltalk/hello.st.in \
45  hello-java/Hello.java \
46  hello-java-awt/Hello.java \
47  hello-java-swing/Hello.java \
48  hello-java-qtjambi/Hello.java \
49  hello-csharp/hello.cs \
50  hello-csharp-forms/hello.cs \
51  hello-gawk/hello.awk \
52  hello-pascal/hello.pas \
53  hello-ycp/hello.ycp \
54  hello-tcl/hello.tcl \
55  hello-tcl-tk/hello.tcl \
56  hello-perl/hello-1.pl.in \
57  hello-perl/hello-2.pl.in \
58  hello-php/hello.php
59
60# List of small POT files.
61SMALLPOTS = \
62  hello-c.pot \
63  hello-c-gnome.pot \
64  hello-c++.pot \
65  hello-c++-qt.pot \
66  hello-c++-kde.pot \
67  hello-c++-gnome.pot \
68  hello-c++-wxwidgets.pot \
69  hello-objc.pot \
70  hello-objc-gnustep.pot \
71  hello-objc-gnome.pot \
72  hello-sh.pot \
73  hello-python.pot \
74  hello-clisp.pot \
75  hello-librep.pot \
76  hello-guile.pot \
77  hello-smalltalk.pot \
78  hello-java.pot \
79  hello-java-awt.pot \
80  hello-java-swing.pot \
81  hello-java-qtjambi.pot \
82  hello-csharp.pot \
83  hello-csharp-forms.pot \
84  hello-gawk.pot \
85  hello-pascal.pot \
86  hello-ycp.pot \
87  hello-tcl.pot \
88  hello-tcl-tk.pot \
89  hello-perl.pot \
90  hello-php.pot
91
92# This is a synthetic domain name.
93DOMAIN = gettext-examples
94
95# This is the copyright holder that gets inserted into the header of the
96# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
97# package.  (Note that the msgstr strings, extracted from the package's
98# sources, belong to the copyright holder of the package.)  Translators are
99# expected to transfer the copyright for their translations to this person
100# or entity, or to disclaim their copyright.  The empty string stands for
101# the public domain; in this case the translators are expected to disclaim
102# their copyright.
103COPYRIGHT_HOLDER = Yoyodyne, Inc.
104
105# This is the email address or URL to which the translators shall report
106# bugs in the untranslated strings:
107# - Strings which are not entire sentences, see the maintainer guidelines
108#   in the GNU gettext documentation, section 'Preparing Strings'.
109# - Strings which use unclear terms or require additional context to be
110#   understood.
111# - Strings which make invalid assumptions about notation of date, time or
112#   money.
113# - Pluralisation problems.
114# - Incorrect English spelling.
115# - Incorrect formatting.
116# It can be your email address, or a mailing list address where translators
117# can write to without being subscribed, or the URL of a web page through
118# which the translators can contact you.
119MSGID_BUGS_ADDRESS = bug-gnu-gettext@gnu.org
120
121# This is the list of locale categories, beyond LC_MESSAGES, for which the
122# message catalogs shall be used.  It is usually empty.
123EXTRA_LOCALE_CATEGORIES =
124
125MSGMERGE = msgmerge
126MSGMERGE_UPDATE = @MSGMERGE@ --update
127MSGINIT = msginit
128MSGCONV = msgconv
129MSGFILTER = msgfilter
130
131# This is computed as $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
132POTFILES_DEPS = @POTFILES_DEPS@
133
134# This is computed as $(foreach lang, $(LINGUAS), $(srcdir)/$(lang).po)
135POFILES = @POFILES@
136# This is computed as $(foreach lang, $(LINGUAS), $(lang).po-update)
137UPDATEPOFILES = @UPDATEPOFILES@
138# This is computed as $(foreach lang, $(LINGUAS), $(lang).nop)
139DUMMYPOFILES = @DUMMYPOFILES@
140
141SUFFIXES = .po .sed .sin .nop .po-update
142
143.sin.sed:
144	sed -e '/^#/d' $< > t-$@
145	mv t-$@ $@
146
147
148all-local: all-local-@USE_NLS@
149
150all-local-yes: stamp-po
151all-local-no:
152
153# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
154# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
155# we don't want to bother translators with empty POT files). We assume that
156# LINGUAS is empty in this case, i.e. $(POFILES) is empty. In this case,
157# stamp-po is a nop (i.e. a phony target).
158
159# stamp-po is a timestamp denoting the last time at which the CATALOGS have
160# been loosely updated. Its purpose is that when a developer or translator
161# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
162# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
163# invocations of "make" will do nothing. This timestamp would not be necessary
164# if updating the $(CATALOGS) would always touch them; however, the rule for
165# $(POFILES) has been designed to not touch files that don't need to be
166# changed.
167stamp-po: $(srcdir)/$(DOMAIN).pot
168	@test ! -f $(srcdir)/$(DOMAIN).pot || { \
169	  echo "touch stamp-po" && \
170	  echo timestamp > stamp-poT && \
171	  mv stamp-poT stamp-po; \
172	}
173
174# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
175# otherwise packages like GCC can not be built if only parts of the source
176# have been downloaded.
177
178# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
179# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
180$(DOMAIN).pot-update: $(POTFILES_DEPS) $(SMALLPOTS) remove-potcdate.sed
181	if test -n '$(MSGID_BUGS_ADDRESS)'; then \
182	  msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
183	else \
184	  msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
185	fi; \
186	$(XGETTEXT) --default-domain=$(DOMAIN) \
187	  --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
188	  --copyright-holder='$(COPYRIGHT_HOLDER)' \
189	  --msgid-bugs-address="$$msgid_bugs_address" \
190	  $(SMALLPOTS)
191	test ! -f $(DOMAIN).po || { \
192	  if test -f $(srcdir)/$(DOMAIN).pot; then \
193	    sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
194	    sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
195	    if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
196	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
197	    else \
198	      rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
199	      mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
200	    fi; \
201	  else \
202	    mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
203	  fi; \
204	}
205
206
207hello-c.pot : $(POTFILES_DEPS)
208	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c
209
210hello-c-gnome.pot : $(POTFILES_DEPS)
211	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c-gnome
212
213hello-c++.pot : $(POTFILES_DEPS)
214	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++
215
216hello-c++-qt.pot : $(POTFILES_DEPS)
217	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-qt
218
219hello-c++-kde.pot : $(POTFILES_DEPS)
220	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-kde
221
222hello-c++-gnome.pot : $(POTFILES_DEPS)
223	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-gnome
224
225hello-c++-wxwidgets.pot : $(POTFILES_DEPS)
226	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-c++-wxwidgets
227
228hello-objc.pot : $(POTFILES_DEPS)
229	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-objc
230
231hello-objc-gnustep.pot : $(POTFILES_DEPS)
232	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-objc-gnustep
233
234hello-objc-gnome.pot : $(POTFILES_DEPS)
235	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-objc-gnome
236
237hello-sh.pot : $(POTFILES_DEPS)
238	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-sh
239
240hello-python.pot : $(POTFILES_DEPS)
241	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-python
242
243hello-clisp.pot : $(POTFILES_DEPS)
244	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-clisp
245
246hello-librep.pot : $(POTFILES_DEPS)
247	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-librep
248
249hello-guile.pot : $(POTFILES_DEPS)
250	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-guile
251
252hello-smalltalk.pot : $(POTFILES_DEPS)
253	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-smalltalk
254
255hello-java.pot : $(POTFILES_DEPS)
256	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-java
257
258hello-java-awt.pot : $(POTFILES_DEPS)
259	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-java-awt
260
261hello-java-swing.pot : $(POTFILES_DEPS)
262	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-java-swing
263
264hello-java-qtjambi.pot : $(POTFILES_DEPS)
265	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-java-qtjambi
266
267hello-csharp.pot : $(POTFILES_DEPS)
268	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-csharp
269
270hello-csharp-forms.pot : $(POTFILES_DEPS)
271	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-csharp-forms
272
273hello-gawk.pot : $(POTFILES_DEPS)
274	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-gawk
275
276hello-pascal.pot : $(POTFILES_DEPS)
277	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-pascal
278
279hello-ycp.pot : $(POTFILES_DEPS)
280	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-ycp
281
282hello-tcl.pot : $(POTFILES_DEPS)
283	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-tcl
284
285hello-tcl-tk.pot : $(POTFILES_DEPS)
286	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-tcl-tk
287
288hello-perl.pot : $(POTFILES_DEPS)
289	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-perl
290
291hello-php.pot : $(POTFILES_DEPS)
292	$(SHELL) '$(srcdir)/xsmallpot.sh' '$(srcdir)' hello-php
293
294
295# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
296# every "make" invocation, only create it when it is missing.
297# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
298$(srcdir)/$(DOMAIN).pot:
299	$(MAKE) $(DOMAIN).pot-update
300
301# This target rebuilds a PO file if $(DOMAIN).pot has changed.
302# Note that a PO file is not touched if it doesn't need to be changed.
303$(POFILES): $(srcdir)/$(DOMAIN).pot
304	@lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
305	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
306	echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
307	cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
308
309
310html ID:
311
312MOSTLYCLEANFILES =
313MOSTLYCLEANFILES += remove-potcdate.sed
314MOSTLYCLEANFILES += stamp-poT
315MOSTLYCLEANFILES += core core.* *.stackdump $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
316MOSTLYCLEANFILES += *.o
317
318DISTCLEANFILES = $(SMALLPOTS)
319
320MAINTAINERCLEANFILES = stamp-po
321
322EXTRA_DIST = remove-potcdate.sin xsmallpot.sh mmsmallpo.sh LINGUAS \
323  $(POFILES)
324
325# Hidden from automake, but really activated. Works around an automake-1.5 bug.
326#distdir: distdir1
327distdir1:
328	$(MAKE) update-po
329	if test -f $(srcdir)/$(DOMAIN).pot; then \
330	  for file in $(DOMAIN).pot stamp-po; do \
331	    if test -f $$file; then d=.; else d=$(srcdir); fi; \
332	    cp -p $$d/$$file $(distdir)/$$file || exit 1; \
333	  done; \
334	fi
335
336update-po: Makefile
337	$(MAKE) $(DOMAIN).pot-update
338	test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
339
340# General rule for updating PO files.
341
342.nop.po-update:
343	@lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
344	tmpdir=`pwd`; \
345	echo "$$lang:"; \
346	test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
347	echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
348	cd $(srcdir); \
349	if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
350	  if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
351	    rm -f $$tmpdir/$$lang.new.po; \
352	  else \
353	    if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
354	      :; \
355	    else \
356	      echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
357	      exit 1; \
358	    fi; \
359	  fi; \
360	  $(MAKE) $(SMALLPOFILES_FOR_lang) LL=$$lang; \
361	else \
362	  echo "msgmerge for $$lang.po failed!" 1>&2; \
363	  rm -f $$tmpdir/$$lang.new.po; \
364	fi
365
366$(DUMMYPOFILES):
367
368
369# Rules for updating small PO files in the other directories.
370# Depend on LL being set.
371
372SMALLPOFILES_FOR_lang = \
373  ../hello-c/po/$$lang.po \
374  ../hello-c-gnome/po/$$lang.po \
375  ../hello-c++/po/$$lang.po \
376  ../hello-c++-qt/po/$$lang.po \
377  ../hello-c++-kde/po/$$lang.po \
378  ../hello-c++-gnome/po/$$lang.po \
379  ../hello-c++-wxwidgets/po/$$lang.po \
380  ../hello-objc/po/$$lang.po \
381  ../hello-objc-gnustep/po/$$lang.po \
382  ../hello-objc-gnome/po/$$lang.po \
383  ../hello-sh/po/$$lang.po \
384  ../hello-python/po/$$lang.po \
385  ../hello-clisp/po/$$lang.po \
386  ../hello-librep/po/$$lang.po \
387  ../hello-guile/po/$$lang.po \
388  ../hello-smalltalk/po/$$lang.po \
389  ../hello-java/po/$$lang.po \
390  ../hello-java-awt/po/$$lang.po \
391  ../hello-java-swing/po/$$lang.po \
392  ../hello-java-qtjambi/po/$$lang.po \
393  ../hello-csharp/po/$$lang.po \
394  ../hello-csharp-forms/po/$$lang.po \
395  ../hello-gawk/po/$$lang.po \
396  ../hello-pascal/po/$$lang.po \
397  ../hello-ycp/po/$$lang.po \
398  ../hello-tcl/po/$$lang.po \
399  ../hello-tcl-tk/po/$$lang.po \
400  ../hello-perl/po/$$lang.po \
401  ../hello-php/po/$$lang.po
402
403../hello-c/po/$(LL).po: hello-c.pot $(LL).po
404	$(SHELL) mmsmallpo.sh hello-c $(LL)
405
406../hello-c-gnome/po/$(LL).po: hello-c-gnome.pot $(LL).po
407	$(SHELL) mmsmallpo.sh hello-c-gnome $(LL)
408
409../hello-c++/po/$(LL).po: hello-c++.pot $(LL).po
410	$(SHELL) mmsmallpo.sh hello-c++ $(LL)
411
412../hello-c++-qt/po/$(LL).po: hello-c++-qt.pot $(LL).po
413	$(SHELL) mmsmallpo.sh hello-c++-qt $(LL)
414
415../hello-c++-kde/po/$(LL).po: hello-c++-kde.pot $(LL).po
416	$(SHELL) mmsmallpo.sh hello-c++-kde $(LL)
417
418../hello-c++-gnome/po/$(LL).po: hello-c++-gnome.pot $(LL).po
419	$(SHELL) mmsmallpo.sh hello-c++-gnome $(LL)
420
421../hello-c++-wxwidgets/po/$(LL).po: hello-c++-wxwidgets.pot $(LL).po
422	$(SHELL) mmsmallpo.sh hello-c++-wxwidgets $(LL)
423
424../hello-objc/po/$(LL).po: hello-objc.pot $(LL).po
425	$(SHELL) mmsmallpo.sh hello-objc $(LL)
426
427../hello-objc-gnustep/po/$(LL).po: hello-objc-gnustep.pot $(LL).po
428	$(SHELL) mmsmallpo.sh hello-objc-gnustep $(LL)
429
430../hello-objc-gnome/po/$(LL).po: hello-objc-gnome.pot $(LL).po
431	$(SHELL) mmsmallpo.sh hello-objc-gnome $(LL)
432
433../hello-sh/po/$(LL).po: hello-sh.pot $(LL).po
434	$(SHELL) mmsmallpo.sh hello-sh $(LL)
435
436../hello-python/po/$(LL).po: hello-python.pot $(LL).po
437	$(SHELL) mmsmallpo.sh hello-python $(LL)
438
439../hello-clisp/po/$(LL).po: hello-clisp.pot $(LL).po
440	$(SHELL) mmsmallpo.sh hello-clisp $(LL)
441
442../hello-librep/po/$(LL).po: hello-librep.pot $(LL).po
443	$(SHELL) mmsmallpo.sh hello-librep $(LL)
444
445../hello-guile/po/$(LL).po: hello-guile.pot $(LL).po
446	$(SHELL) mmsmallpo.sh hello-guile $(LL)
447
448../hello-smalltalk/po/$(LL).po: hello-smalltalk.pot $(LL).po
449	$(SHELL) mmsmallpo.sh hello-smalltalk $(LL)
450
451../hello-java/po/$(LL).po: hello-java.pot $(LL).po
452	$(SHELL) mmsmallpo.sh hello-java $(LL)
453
454../hello-java-awt/po/$(LL).po: hello-java-awt.pot $(LL).po
455	$(SHELL) mmsmallpo.sh hello-java-awt $(LL)
456
457../hello-java-swing/po/$(LL).po: hello-java-swing.pot $(LL).po
458	$(SHELL) mmsmallpo.sh hello-java-swing $(LL)
459
460../hello-java-qtjambi/po/$(LL).po: hello-java-qtjambi.pot $(LL).po
461	$(SHELL) mmsmallpo.sh hello-java-qtjambi $(LL)
462
463../hello-csharp/po/$(LL).po: hello-csharp.pot $(LL).po
464	$(SHELL) mmsmallpo.sh hello-csharp $(LL)
465
466../hello-csharp-forms/po/$(LL).po: hello-csharp-forms.pot $(LL).po
467	$(SHELL) mmsmallpo.sh hello-csharp-forms $(LL)
468
469../hello-gawk/po/$(LL).po: hello-gawk.pot $(LL).po
470	$(SHELL) mmsmallpo.sh hello-gawk $(LL)
471
472../hello-pascal/po/$(LL).po: hello-pascal.pot $(LL).po
473	$(SHELL) mmsmallpo.sh hello-pascal $(LL)
474
475../hello-ycp/po/$(LL).po: hello-ycp.pot $(LL).po
476	$(SHELL) mmsmallpo.sh hello-ycp $(LL)
477
478../hello-tcl/po/$(LL).po: hello-tcl.pot $(LL).po
479	$(SHELL) mmsmallpo.sh hello-tcl $(LL)
480
481../hello-tcl-tk/po/$(LL).po: hello-tcl-tk.pot $(LL).po
482	$(SHELL) mmsmallpo.sh hello-tcl-tk $(LL)
483
484../hello-perl/po/$(LL).po: hello-perl.pot $(LL).po
485	$(SHELL) mmsmallpo.sh hello-perl $(LL)
486
487../hello-php/po/$(LL).po: hello-php.pot $(LL).po
488	$(SHELL) mmsmallpo.sh hello-php $(LL)
489