Updates to Tomato RAF including NGINX && PHP
[tomato.git] / release / src / router / libexif / po / Makefile
blob5cf4a24bd2a653c15c415bbb3a5f01805a210d18
1 # Makefile for PO directory in any package using GNU gettext.
2 # Copyright (C) 1995-1997, 2000-2004 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
7 # functionality.
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.14
13 PACKAGE = libexif
14 VERSION = 0.6.19
16 SHELL = /bin/sh
19 srcdir = .
20 top_srcdir = ..
23 prefix =
24 exec_prefix = ${prefix}
25 datadir = ${prefix}/share
26 localedir = $(datadir)/locale
27 gettextsrcdir = $(datadir)/gettext/po
29 INSTALL = /usr/bin/install -c
30 INSTALL_DATA = ${INSTALL} -m 644
31 MKINSTALLDIRS = $(top_builddir)/./mkinstalldirs
32 mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
34 GMSGFMT = /usr/bin/msgfmt
35 MSGFMT = /usr/bin/msgfmt
36 XGETTEXT = /usr/bin/xgettext
37 MSGMERGE = msgmerge
38 MSGMERGE_UPDATE = /usr/bin/msgmerge --update
39 MSGINIT = msginit
40 MSGCONV = msgconv
41 MSGFILTER = msgfilter
43 POFILES = be.po cs.po da.po de.po en_CA.po en_GB.po es.po fr.po it.po ja.po nl.po pl.po pt.po pt_BR.po ru.po sk.po sq.po sr.po sv.po vi.po zh_CN.po
44 GMOFILES = be.gmo cs.gmo da.gmo de.gmo en_CA.gmo en_GB.gmo es.gmo fr.gmo it.gmo ja.gmo nl.gmo pl.gmo pt.gmo pt_BR.gmo ru.gmo sk.gmo sq.gmo sr.gmo sv.gmo vi.gmo zh_CN.gmo
45 UPDATEPOFILES = be.po-update cs.po-update da.po-update de.po-update en_CA.po-update en_GB.po-update es.po-update fr.po-update it.po-update ja.po-update nl.po-update pl.po-update pt.po-update pt_BR.po-update ru.po-update sk.po-update sq.po-update sr.po-update sv.po-update vi.po-update zh_CN.po-update
46 DUMMYPOFILES = be.nop cs.nop da.nop de.nop en_CA.nop en_GB.nop es.nop fr.nop it.nop ja.nop nl.nop pl.nop pt.nop pt_BR.nop ru.nop sk.nop sq.nop sr.nop sv.nop vi.nop zh_CN.nop
47 DISTFILES.common = Makefile.in.in remove-potcdate.sin \
48 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
49 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
50 $(POFILES) $(GMOFILES) \
51 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
53 POTFILES = \
54 ../libexif/canon/mnote-canon-entry.c \
55 ../libexif/canon/mnote-canon-tag.c \
56 ../libexif/exif-byte-order.c \
57 ../libexif/exif-data.c \
58 ../libexif/exif-entry.c \
59 ../libexif/exif-format.c \
60 ../libexif/exif-loader.c \
61 ../libexif/exif-log.c \
62 ../libexif/exif-tag.c \
63 ../libexif/fuji/mnote-fuji-entry.c \
64 ../libexif/fuji/mnote-fuji-tag.c \
65 ../libexif/olympus/mnote-olympus-entry.c \
66 ../libexif/olympus/mnote-olympus-tag.c \
67 ../libexif/pentax/mnote-pentax-entry.c \
68 ../libexif/pentax/mnote-pentax-tag.c \
69 ../test/nls/test-codeset.c \
70 ../test/nls/test-nls.c
72 CATALOGS = be.gmo cs.gmo da.gmo de.gmo en_CA.gmo en_GB.gmo es.gmo fr.gmo it.gmo ja.gmo nl.gmo pl.gmo pt.gmo pt_BR.gmo ru.gmo sk.gmo sq.gmo sr.gmo sv.gmo vi.gmo zh_CN.gmo
74 # Makevars gets inserted here. (Don't remove this line!)
75 # Makefile variables for PO directory in any package using GNU gettext.
77 # Usually the message domain is the same as the package name.
78 DOMAIN = libexif-12
80 # These two variables depend on the location of this directory.
81 subdir = po
82 top_builddir = ..
84 # These options get passed to xgettext.
85 XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
87 # This is the copyright holder that gets inserted into the header of the
88 # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
89 # package. (Note that the msgstr strings, extracted from the package's
90 # sources, belong to the copyright holder of the package.) Translators are
91 # expected to transfer the copyright for their translations to this person
92 # or entity, or to disclaim their copyright. The empty string stands for
93 # the public domain; in this case the translators are expected to disclaim
94 # their copyright.
95 COPYRIGHT_HOLDER = Lutz Mueller and others
97 # This is the email address or URL to which the translators shall report
98 # bugs in the untranslated strings:
99 # - Strings which are not entire sentences, see the maintainer guidelines
100 # in the GNU gettext documentation, section 'Preparing Strings'.
101 # - Strings which use unclear terms or require additional context to be
102 # understood.
103 # - Strings which make invalid assumptions about notation of date, time or
104 # money.
105 # - Pluralisation problems.
106 # - Incorrect English spelling.
107 # - Incorrect formatting.
108 # It can be your email address, or a mailing list address where translators
109 # can write to without being subscribed, or the URL of a web page through
110 # which the translators can contact you.
111 MSGID_BUGS_ADDRESS = libexif-devel@lists.sourceforge.net
113 # This is the list of locale categories, beyond LC_MESSAGES, for which the
114 # message catalogs shall be used. It is usually empty.
115 EXTRA_LOCALE_CATEGORIES =
117 .SUFFIXES:
118 .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
120 .po.mo:
121 @echo "$(MSGFMT) -c -o $@ $<"; \
122 $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
124 .po.gmo:
125 @lang=`echo $* | sed -e 's,.*/,,'`; \
126 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
127 echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
128 cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
130 .sin.sed:
131 sed -e '/^#/d' $< > t-$@
132 mv t-$@ $@
135 all: all-no
137 all-yes: stamp-po
138 all-no:
140 # stamp-po is a timestamp denoting the last time at which the CATALOGS have
141 # been loosely updated. Its purpose is that when a developer or translator
142 # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
143 # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
144 # invocations of "make" will do nothing. This timestamp would not be necessary
145 # if updating the $(CATALOGS) would always touch them; however, the rule for
146 # $(POFILES) has been designed to not touch files that don't need to be
147 # changed.
148 stamp-po: $(srcdir)/$(DOMAIN).pot
149 test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
150 @echo "touch stamp-po"
151 @echo timestamp > stamp-poT
152 @mv stamp-poT stamp-po
154 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
155 # otherwise packages like GCC can not be built if only parts of the source
156 # have been downloaded.
158 # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
159 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
160 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
161 $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
162 --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
163 --files-from=$(srcdir)/POTFILES.in \
164 --copyright-holder='$(COPYRIGHT_HOLDER)' \
165 --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
166 test ! -f $(DOMAIN).po || { \
167 if test -f $(srcdir)/$(DOMAIN).pot; then \
168 sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
169 sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
170 if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
171 rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
172 else \
173 rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
174 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
175 fi; \
176 else \
177 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
178 fi; \
181 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
182 # every "make" invocation, only create it when it is missing.
183 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
184 $(srcdir)/$(DOMAIN).pot:
185 $(MAKE) $(DOMAIN).pot-update
187 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
188 # Note that a PO file is not touched if it doesn't need to be changed.
189 $(POFILES): $(srcdir)/$(DOMAIN).pot
190 @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
191 if test -f "$(srcdir)/$${lang}.po"; then \
192 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
193 echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
194 cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
195 else \
196 $(MAKE) $${lang}.po-create; \
200 install: install-exec install-data
201 install-exec:
202 install-data: install-data-no
203 if test "$(PACKAGE)" = "gettext-tools"; then \
204 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
205 for file in $(DISTFILES.common) Makevars.template; do \
206 $(INSTALL_DATA) $(srcdir)/$$file \
207 $(DESTDIR)$(gettextsrcdir)/$$file; \
208 done; \
209 for file in Makevars; do \
210 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
211 done; \
212 else \
213 : ; \
215 install-data-no: all
216 install-data-yes: all
217 $(mkinstalldirs) $(DESTDIR)$(datadir)
218 @catalogs='$(CATALOGS)'; \
219 for cat in $$catalogs; do \
220 cat=`basename $$cat`; \
221 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
222 dir=$(localedir)/$$lang/LC_MESSAGES; \
223 $(mkinstalldirs) $(DESTDIR)$$dir; \
224 if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
225 $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
226 echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
227 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
228 if test -n "$$lc"; then \
229 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
230 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
231 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
232 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
233 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
234 for file in *; do \
235 if test -f $$file; then \
236 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
237 fi; \
238 done); \
239 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
240 else \
241 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
242 :; \
243 else \
244 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
245 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
246 fi; \
247 fi; \
248 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
249 ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
250 ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
251 cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
252 echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
253 fi; \
254 done; \
255 done
257 install-strip: install
259 installdirs: installdirs-exec installdirs-data
260 installdirs-exec:
261 installdirs-data: installdirs-data-no
262 if test "$(PACKAGE)" = "gettext-tools"; then \
263 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
264 else \
265 : ; \
267 installdirs-data-no:
268 installdirs-data-yes:
269 $(mkinstalldirs) $(DESTDIR)$(datadir)
270 @catalogs='$(CATALOGS)'; \
271 for cat in $$catalogs; do \
272 cat=`basename $$cat`; \
273 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
274 dir=$(localedir)/$$lang/LC_MESSAGES; \
275 $(mkinstalldirs) $(DESTDIR)$$dir; \
276 for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
277 if test -n "$$lc"; then \
278 if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
279 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
280 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
281 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
282 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
283 for file in *; do \
284 if test -f $$file; then \
285 ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
286 fi; \
287 done); \
288 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
289 else \
290 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
291 :; \
292 else \
293 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
294 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
295 fi; \
296 fi; \
297 fi; \
298 done; \
299 done
301 # Define this as empty until I found a useful application.
302 installcheck:
304 uninstall: uninstall-exec uninstall-data
305 uninstall-exec:
306 uninstall-data: uninstall-data-no
307 if test "$(PACKAGE)" = "gettext-tools"; then \
308 for file in $(DISTFILES.common) Makevars.template; do \
309 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
310 done; \
311 else \
312 : ; \
314 uninstall-data-no:
315 uninstall-data-yes:
316 catalogs='$(CATALOGS)'; \
317 for cat in $$catalogs; do \
318 cat=`basename $$cat`; \
319 lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
320 for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
321 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
322 done; \
323 done
325 check: all
327 info dvi ps pdf html tags TAGS ctags CTAGS ID:
329 mostlyclean:
330 rm -f remove-potcdate.sed
331 rm -f stamp-poT
332 rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
333 rm -fr *.o
335 clean: mostlyclean
337 distclean: clean
338 rm -f Makefile Makefile.in POTFILES *.mo
340 maintainer-clean: distclean
341 @echo "This command is intended for maintainers to use;"
342 @echo "it deletes files that may require special tools to rebuild."
343 rm -f stamp-po $(GMOFILES)
345 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
346 dist distdir:
347 $(MAKE) update-po
348 @$(MAKE) dist2
349 # This is a separate target because 'update-po' must be executed before.
350 dist2: $(DISTFILES)
351 dists="$(DISTFILES)"; \
352 if test "$(PACKAGE)" = "gettext-tools"; then \
353 dists="$$dists Makevars.template"; \
354 fi; \
355 if test -f $(srcdir)/ChangeLog; then \
356 dists="$$dists ChangeLog"; \
357 fi; \
358 for i in 0 1 2 3 4 5 6 7 8 9; do \
359 if test -f $(srcdir)/ChangeLog.$$i; then \
360 dists="$$dists ChangeLog.$$i"; \
361 fi; \
362 done; \
363 if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
364 for file in $$dists; do \
365 if test -f $$file; then \
366 cp -p $$file $(distdir); \
367 else \
368 cp -p $(srcdir)/$$file $(distdir); \
369 fi; \
370 done
372 update-po: Makefile
373 $(MAKE) $(DOMAIN).pot-update
374 test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
375 $(MAKE) update-gmo
377 # General rule for creating PO files.
379 .nop.po-create:
380 @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
381 echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
382 exit 1
384 # General rule for updating PO files.
386 .nop.po-update:
387 @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
388 if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
389 tmpdir=`pwd`; \
390 echo "$$lang:"; \
391 test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
392 echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
393 cd $(srcdir); \
394 if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
395 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
396 rm -f $$tmpdir/$$lang.new.po; \
397 else \
398 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
399 :; \
400 else \
401 echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
402 exit 1; \
403 fi; \
404 fi; \
405 else \
406 echo "msgmerge for $$lang.po failed!" 1>&2; \
407 rm -f $$tmpdir/$$lang.new.po; \
410 $(DUMMYPOFILES):
412 update-gmo: Makefile $(GMOFILES)
415 Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
416 cd $(top_builddir) \
417 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
418 $(SHELL) ./config.status
420 force:
422 # Tell versions [3.59,3.63) of GNU make not to export all variables.
423 # Otherwise a system limit (for SysV at least) may be exceeded.
424 .NOEXPORT:
425 # Special Makefile rules for English message catalogs with quotation marks.
427 DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
429 .SUFFIXES: .insert-header .po-update-en
431 en@quot.po-create:
432 $(MAKE) en@quot.po-update
433 en@boldquot.po-create:
434 $(MAKE) en@boldquot.po-update
436 en@quot.po-update: en@quot.po-update-en
437 en@boldquot.po-update: en@boldquot.po-update-en
439 .insert-header.po-update-en:
440 @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
441 if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
442 tmpdir=`pwd`; \
443 echo "$$lang:"; \
444 ll=`echo $$lang | sed -e 's/@.*//'`; \
445 LC_ALL=C; export LC_ALL; \
446 cd $(srcdir); \
447 if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
448 if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
449 rm -f $$tmpdir/$$lang.new.po; \
450 else \
451 if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
452 :; \
453 else \
454 echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
455 exit 1; \
456 fi; \
457 fi; \
458 else \
459 echo "creation of $$lang.po failed!" 1>&2; \
460 rm -f $$tmpdir/$$lang.new.po; \
463 en@quot.insert-header: insert-header.sin
464 sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
466 en@boldquot.insert-header: insert-header.sin
467 sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
469 mostlyclean: mostlyclean-quot
470 mostlyclean-quot:
471 rm -f *.insert-header