Makefile.in.in 13 KB

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