PageRenderTime 2056ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/platform/win32/msvc/external/exiv2/po/Makefile.in.in

http://github.com/MythTV/mythtv
Autoconf | 385 lines | 298 code | 46 blank | 41 comment | 95 complexity | d4d64c5e87a7b8159e1a123ed53f9d38 MD5 | raw file
Possible License(s): CC-BY-SA-3.0, MIT, GPL-2.0, LGPL-2.0, BSD-3-Clause, GPL-3.0, LGPL-2.1, LGPL-3.0, MPL-2.0-no-copyleft-exception
  1. # Makefile for PO directory in any package using GNU gettext.
  2. # Copyright (C) 1995-1997, 2000-2005 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
  3. #
  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.
  10. #
  11. # Origin: gettext-0.14.4
  12. PACKAGE = @PACKAGE@
  13. VERSION = @VERSION@
  14. PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  15. SHELL = /bin/sh
  16. @SET_MAKE@
  17. srcdir = @srcdir@
  18. top_srcdir = @top_srcdir@
  19. VPATH = @srcdir@
  20. prefix = @prefix@
  21. exec_prefix = @exec_prefix@
  22. datarootdir = @datarootdir@
  23. datadir = @datadir@
  24. localedir = $(datadir)/locale
  25. gettextsrcdir = $(datadir)/gettext/po
  26. INSTALL = @INSTALL@
  27. INSTALL_DATA = @INSTALL_DATA@
  28. MKINSTALLDIRS = @MKINSTALLDIRS@
  29. mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
  30. GMSGFMT = @GMSGFMT@
  31. MSGFMT = @MSGFMT@
  32. XGETTEXT = @XGETTEXT@
  33. MSGMERGE = msgmerge
  34. MSGMERGE_UPDATE = @MSGMERGE@ --update
  35. MSGINIT = msginit
  36. MSGCONV = msgconv
  37. MSGFILTER = msgfilter
  38. POFILES = @POFILES@
  39. GMOFILES = @GMOFILES@
  40. UPDATEPOFILES = @UPDATEPOFILES@
  41. DUMMYPOFILES = @DUMMYPOFILES@
  42. DISTFILES.common = Makefile.in.in remove-potcdate.sin \
  43. $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
  44. DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
  45. $(POFILES) $(GMOFILES) \
  46. $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
  47. POTFILES = \
  48. CATALOGS = @CATALOGS@
  49. # Makevars gets inserted here. (Don't remove this line!)
  50. .SUFFIXES:
  51. .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
  52. .po.mo:
  53. @echo "$(MSGFMT) -c -o $@ $<"; \
  54. $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
  55. .po.gmo:
  56. @lang=`echo $* | sed -e 's,.*/,,'`; \
  57. test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
  58. echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
  59. cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
  60. .sin.sed:
  61. sed -e '/^#/d' $< > t-$@
  62. mv t-$@ $@
  63. all: all-@USE_NLS@
  64. all-yes: stamp-po
  65. all-no:
  66. # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
  67. # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
  68. # we don't want to bother translators with empty POT files). We assume that
  69. # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
  70. # In this case, stamp-po is a nop (i.e. a phony target).
  71. # stamp-po is a timestamp denoting the last time at which the CATALOGS have
  72. # been loosely updated. Its purpose is that when a developer or translator
  73. # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
  74. # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
  75. # invocations of "make" will do nothing. This timestamp would not be necessary
  76. # if updating the $(CATALOGS) would always touch them; however, the rule for
  77. # $(POFILES) has been designed to not touch files that don't need to be
  78. # changed.
  79. stamp-po: $(srcdir)/$(DOMAIN).pot
  80. test ! -f $(srcdir)/$(DOMAIN).pot || \
  81. test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
  82. @test ! -f $(srcdir)/$(DOMAIN).pot || { \
  83. echo "touch stamp-po" && \
  84. echo timestamp > stamp-poT && \
  85. mv stamp-poT stamp-po; \
  86. }
  87. # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
  88. # otherwise packages like GCC can not be built if only parts of the source
  89. # have been downloaded.
  90. # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
  91. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
  92. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
  93. if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
  94. msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
  95. else \
  96. msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
  97. fi; \
  98. $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
  99. --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
  100. --files-from=$(srcdir)/POTFILES.in \
  101. --copyright-holder='$(COPYRIGHT_HOLDER)' \
  102. --msgid-bugs-address="$$msgid_bugs_address"
  103. test ! -f $(DOMAIN).po || { \
  104. if test -f $(srcdir)/$(DOMAIN).pot; then \
  105. sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
  106. sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
  107. if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
  108. rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
  109. else \
  110. rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
  111. mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
  112. fi; \
  113. else \
  114. mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
  115. fi; \
  116. }
  117. # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
  118. # every "make" invocation, only create it when it is missing.
  119. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
  120. $(srcdir)/$(DOMAIN).pot:
  121. $(MAKE) $(DOMAIN).pot-update
  122. # This target rebuilds a PO file if $(DOMAIN).pot has changed.
  123. # Note that a PO file is not touched if it doesn't need to be changed.
  124. $(POFILES): $(srcdir)/$(DOMAIN).pot
  125. @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
  126. if test -f "$(srcdir)/$${lang}.po"; then \
  127. test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
  128. echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
  129. cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
  130. else \
  131. $(MAKE) $${lang}.po-create; \
  132. fi
  133. install: install-exec install-data
  134. install-exec:
  135. install-data: install-data-@USE_NLS@
  136. if test "$(PACKAGE)" = "gettext-tools"; then \
  137. $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
  138. for file in $(DISTFILES.common) Makevars.template; do \
  139. $(INSTALL_DATA) $(srcdir)/$$file \
  140. $(DESTDIR)$(gettextsrcdir)/$$file; \
  141. done; \
  142. for file in Makevars; do \
  143. rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
  144. done; \
  145. else \
  146. : ; \
  147. fi
  148. install-data-no: all
  149. install-data-yes: all
  150. $(mkinstalldirs) $(DESTDIR)$(datadir)
  151. @catalogs='$(CATALOGS)'; \
  152. for cat in $$catalogs; do \
  153. cat=`basename $$cat`; \
  154. lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
  155. dir=$(localedir)/$$lang/LC_MESSAGES; \
  156. $(mkinstalldirs) $(DESTDIR)$$dir; \
  157. if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
  158. $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
  159. echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
  160. for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
  161. if test -n "$$lc"; then \
  162. if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
  163. link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
  164. mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  165. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  166. (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
  167. for file in *; do \
  168. if test -f $$file; then \
  169. ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
  170. fi; \
  171. done); \
  172. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  173. else \
  174. if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
  175. :; \
  176. else \
  177. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
  178. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  179. fi; \
  180. fi; \
  181. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
  182. ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
  183. ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
  184. cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
  185. echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
  186. fi; \
  187. done; \
  188. done
  189. install-strip: install
  190. installdirs: installdirs-exec installdirs-data
  191. installdirs-exec:
  192. installdirs-data: installdirs-data-@USE_NLS@
  193. if test "$(PACKAGE)" = "gettext-tools"; then \
  194. $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
  195. else \
  196. : ; \
  197. fi
  198. installdirs-data-no:
  199. installdirs-data-yes:
  200. $(mkinstalldirs) $(DESTDIR)$(datadir)
  201. @catalogs='$(CATALOGS)'; \
  202. for cat in $$catalogs; do \
  203. cat=`basename $$cat`; \
  204. lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
  205. dir=$(localedir)/$$lang/LC_MESSAGES; \
  206. $(mkinstalldirs) $(DESTDIR)$$dir; \
  207. for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
  208. if test -n "$$lc"; then \
  209. if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
  210. link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
  211. mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  212. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  213. (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
  214. for file in *; do \
  215. if test -f $$file; then \
  216. ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
  217. fi; \
  218. done); \
  219. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  220. else \
  221. if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
  222. :; \
  223. else \
  224. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
  225. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  226. fi; \
  227. fi; \
  228. fi; \
  229. done; \
  230. done
  231. # Define this as empty until I found a useful application.
  232. installcheck:
  233. uninstall: uninstall-exec uninstall-data
  234. uninstall-exec:
  235. uninstall-data: uninstall-data-@USE_NLS@
  236. if test "$(PACKAGE)" = "gettext-tools"; then \
  237. for file in $(DISTFILES.common) Makevars.template; do \
  238. rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
  239. done; \
  240. else \
  241. : ; \
  242. fi
  243. uninstall-data-no:
  244. uninstall-data-yes:
  245. catalogs='$(CATALOGS)'; \
  246. for cat in $$catalogs; do \
  247. cat=`basename $$cat`; \
  248. lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
  249. for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
  250. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
  251. done; \
  252. done
  253. check: all
  254. info dvi ps pdf html tags TAGS ctags CTAGS ID:
  255. mostlyclean:
  256. rm -f remove-potcdate.sed
  257. rm -f stamp-poT
  258. rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
  259. rm -fr *.o
  260. clean: mostlyclean
  261. distclean: clean
  262. rm -f Makefile Makefile.in POTFILES *.mo
  263. maintainer-clean: distclean
  264. @echo "This command is intended for maintainers to use;"
  265. @echo "it deletes files that may require special tools to rebuild."
  266. rm -f stamp-po $(GMOFILES)
  267. distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
  268. dist distdir:
  269. $(MAKE) update-po
  270. @$(MAKE) dist2
  271. # This is a separate target because 'update-po' must be executed before.
  272. dist2: stamp-po $(DISTFILES)
  273. dists="$(DISTFILES)"; \
  274. if test "$(PACKAGE)" = "gettext-tools"; then \
  275. dists="$$dists Makevars.template"; \
  276. fi; \
  277. if test -f $(srcdir)/$(DOMAIN).pot; then \
  278. dists="$$dists $(DOMAIN).pot stamp-po"; \
  279. fi; \
  280. if test -f $(srcdir)/ChangeLog; then \
  281. dists="$$dists ChangeLog"; \
  282. fi; \
  283. for i in 0 1 2 3 4 5 6 7 8 9; do \
  284. if test -f $(srcdir)/ChangeLog.$$i; then \
  285. dists="$$dists ChangeLog.$$i"; \
  286. fi; \
  287. done; \
  288. if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
  289. for file in $$dists; do \
  290. if test -f $$file; then \
  291. cp -p $$file $(distdir) || exit 1; \
  292. else \
  293. cp -p $(srcdir)/$$file $(distdir) || exit 1; \
  294. fi; \
  295. done
  296. update-po: Makefile
  297. $(MAKE) $(DOMAIN).pot-update
  298. test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
  299. $(MAKE) update-gmo
  300. # General rule for creating PO files.
  301. .nop.po-create:
  302. @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
  303. echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
  304. exit 1
  305. # General rule for updating PO files.
  306. .nop.po-update:
  307. @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
  308. if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
  309. tmpdir=`pwd`; \
  310. echo "$$lang:"; \
  311. test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
  312. echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
  313. cd $(srcdir); \
  314. if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
  315. if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
  316. rm -f $$tmpdir/$$lang.new.po; \
  317. else \
  318. if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
  319. :; \
  320. else \
  321. echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
  322. exit 1; \
  323. fi; \
  324. fi; \
  325. else \
  326. echo "msgmerge for $$lang.po failed!" 1>&2; \
  327. rm -f $$tmpdir/$$lang.new.po; \
  328. fi
  329. $(DUMMYPOFILES):
  330. update-gmo: Makefile $(GMOFILES)
  331. @:
  332. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
  333. cd $(top_builddir) \
  334. && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
  335. $(SHELL) ./config.status
  336. force:
  337. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  338. # Otherwise a system limit (for SysV at least) may be exceeded.
  339. .NOEXPORT: