Makefile.in.in 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484
  1. # Makefile for PO directory in any package using GNU gettext.
  2. # Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
  3. #
  4. # Copying and distribution of this file, with or without modification,
  5. # are permitted in any medium without royalty provided the copyright
  6. # notice and this notice are preserved. This file is offered as-is,
  7. # without any warranty.
  8. #
  9. # Origin: gettext-0.19.8
  10. GETTEXT_MACRO_VERSION = 0.19
  11. PACKAGE = @PACKAGE@
  12. VERSION = @VERSION@
  13. PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
  14. SED = @SED@
  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 = @localedir@
  25. gettextsrcdir = $(datadir)/gettext/po
  26. INSTALL = @INSTALL@
  27. INSTALL_DATA = @INSTALL_DATA@
  28. # We use $(mkdir_p).
  29. # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
  30. # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
  31. # @install_sh@ does not start with $(SHELL), so we add it.
  32. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
  33. # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
  34. # versions, $(mkinstalldirs) and $(install_sh) are unused.
  35. mkinstalldirs = $(SHELL) @install_sh@ -d
  36. install_sh = $(SHELL) @install_sh@
  37. MKDIR_P = @MKDIR_P@
  38. mkdir_p = @mkdir_p@
  39. # When building gettext-tools, we prefer to use the built programs
  40. # rather than installed programs. However, we can't do that when we
  41. # are cross compiling.
  42. CROSS_COMPILING = @CROSS_COMPILING@
  43. GMSGFMT_ = @GMSGFMT@
  44. GMSGFMT_no = @GMSGFMT@
  45. GMSGFMT_yes = @GMSGFMT_015@
  46. GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
  47. MSGFMT_ = @MSGFMT@
  48. MSGFMT_no = @MSGFMT@
  49. MSGFMT_yes = @MSGFMT_015@
  50. MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
  51. XGETTEXT_ = @XGETTEXT@
  52. XGETTEXT_no = @XGETTEXT@
  53. XGETTEXT_yes = @XGETTEXT_015@
  54. XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
  55. MSGMERGE = msgmerge
  56. MSGMERGE_UPDATE = @MSGMERGE@ --update
  57. MSGINIT = msginit
  58. MSGCONV = msgconv
  59. MSGFILTER = msgfilter
  60. POFILES = @POFILES@
  61. GMOFILES = @GMOFILES@
  62. UPDATEPOFILES = @UPDATEPOFILES@
  63. DUMMYPOFILES = @DUMMYPOFILES@
  64. DISTFILES.common = Makefile.in.in remove-potcdate.sin \
  65. $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
  66. DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
  67. $(POFILES) $(GMOFILES) \
  68. $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
  69. POTFILES = \
  70. CATALOGS = @CATALOGS@
  71. POFILESDEPS_ = $(srcdir)/$(DOMAIN).pot
  72. POFILESDEPS_yes = $(POFILESDEPS_)
  73. POFILESDEPS_no =
  74. POFILESDEPS = $(POFILESDEPS_$(PO_DEPENDS_ON_POT))
  75. DISTFILESDEPS_ = update-po
  76. DISTFILESDEPS_yes = $(DISTFILESDEPS_)
  77. DISTFILESDEPS_no =
  78. DISTFILESDEPS = $(DISTFILESDEPS_$(DIST_DEPENDS_ON_UPDATE_PO))
  79. # Makevars gets inserted here. (Don't remove this line!)
  80. .SUFFIXES:
  81. .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
  82. .po.mo:
  83. @echo "$(MSGFMT) -c -o $@ $<"; \
  84. $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
  85. .po.gmo:
  86. @lang=`echo $* | sed -e 's,.*/,,'`; \
  87. test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
  88. echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
  89. cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
  90. .sin.sed:
  91. sed -e '/^#/d' $< > t-$@
  92. mv t-$@ $@
  93. all: all-@USE_NLS@
  94. all-yes: stamp-po
  95. all-no:
  96. # Ensure that the gettext macros and this Makefile.in.in are in sync.
  97. CHECK_MACRO_VERSION = \
  98. test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
  99. || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
  100. exit 1; \
  101. }
  102. # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
  103. # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
  104. # we don't want to bother translators with empty POT files). We assume that
  105. # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
  106. # In this case, stamp-po is a nop (i.e. a phony target).
  107. # stamp-po is a timestamp denoting the last time at which the CATALOGS have
  108. # been loosely updated. Its purpose is that when a developer or translator
  109. # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
  110. # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
  111. # invocations of "make" will do nothing. This timestamp would not be necessary
  112. # if updating the $(CATALOGS) would always touch them; however, the rule for
  113. # $(POFILES) has been designed to not touch files that don't need to be
  114. # changed.
  115. stamp-po: $(srcdir)/$(DOMAIN).pot
  116. @$(CHECK_MACRO_VERSION)
  117. test ! -f $(srcdir)/$(DOMAIN).pot || \
  118. test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
  119. @test ! -f $(srcdir)/$(DOMAIN).pot || { \
  120. echo "touch stamp-po" && \
  121. echo timestamp > stamp-poT && \
  122. mv stamp-poT stamp-po; \
  123. }
  124. # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
  125. # otherwise packages like GCC can not be built if only parts of the source
  126. # have been downloaded.
  127. # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
  128. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
  129. # The determination of whether the package xyz is a GNU one is based on the
  130. # heuristic whether some file in the top level directory mentions "GNU xyz".
  131. # If GNU 'find' is available, we avoid grepping through monster files.
  132. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
  133. package_gnu="$(PACKAGE_GNU)"; \
  134. test -n "$$package_gnu" || { \
  135. if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \
  136. LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f \
  137. -size -10000000c -exec grep 'GNU @PACKAGE@' \
  138. /dev/null '{}' ';' 2>/dev/null; \
  139. else \
  140. LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \
  141. fi; \
  142. } | grep -v 'libtool:' >/dev/null; then \
  143. package_gnu=yes; \
  144. else \
  145. package_gnu=no; \
  146. fi; \
  147. }; \
  148. if test "$$package_gnu" = "yes"; then \
  149. package_prefix='GNU '; \
  150. else \
  151. package_prefix=''; \
  152. fi; \
  153. if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
  154. msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
  155. else \
  156. msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
  157. fi; \
  158. case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
  159. '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
  160. $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
  161. --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
  162. --files-from=$(srcdir)/POTFILES.in \
  163. --copyright-holder='$(COPYRIGHT_HOLDER)' \
  164. --msgid-bugs-address="$$msgid_bugs_address" \
  165. ;; \
  166. *) \
  167. $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
  168. --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
  169. --files-from=$(srcdir)/POTFILES.in \
  170. --copyright-holder='$(COPYRIGHT_HOLDER)' \
  171. --package-name="$${package_prefix}@PACKAGE@" \
  172. --package-version='@VERSION@' \
  173. --msgid-bugs-address="$$msgid_bugs_address" \
  174. ;; \
  175. esac
  176. test ! -f $(DOMAIN).po || { \
  177. if test -f $(srcdir)/$(DOMAIN).pot-header; then \
  178. sed -e '1,/^#$$/d' < $(DOMAIN).po > $(DOMAIN).1po && \
  179. cat $(srcdir)/$(DOMAIN).pot-header $(DOMAIN).1po > $(DOMAIN).po; \
  180. rm -f $(DOMAIN).1po; \
  181. fi; \
  182. if test -f $(srcdir)/$(DOMAIN).pot; then \
  183. sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
  184. sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
  185. if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
  186. rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
  187. else \
  188. rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
  189. mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
  190. fi; \
  191. else \
  192. mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
  193. fi; \
  194. }
  195. # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
  196. # every "make" invocation, only create it when it is missing.
  197. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
  198. $(srcdir)/$(DOMAIN).pot:
  199. $(MAKE) $(DOMAIN).pot-update
  200. # This target rebuilds a PO file if $(DOMAIN).pot has changed.
  201. # Note that a PO file is not touched if it doesn't need to be changed.
  202. $(POFILES): $(POFILESDEPS)
  203. @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
  204. if test -f "$(srcdir)/$${lang}.po"; then \
  205. test -f $(srcdir)/$(DOMAIN).pot || $(MAKE) $(srcdir)/$(DOMAIN).pot; \
  206. test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
  207. echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
  208. cd $(srcdir) \
  209. && { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
  210. '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
  211. $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
  212. *) \
  213. $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
  214. esac; \
  215. }; \
  216. else \
  217. $(MAKE) $${lang}.po-create; \
  218. fi
  219. install: install-exec install-data
  220. install-exec:
  221. install-data: install-data-@USE_NLS@
  222. if test "$(PACKAGE)" = "gettext-tools"; then \
  223. $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
  224. for file in $(DISTFILES.common) Makevars.template; do \
  225. $(INSTALL_DATA) $(srcdir)/$$file \
  226. $(DESTDIR)$(gettextsrcdir)/$$file; \
  227. done; \
  228. for file in Makevars; do \
  229. rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
  230. done; \
  231. else \
  232. : ; \
  233. fi
  234. install-data-no: all
  235. install-data-yes: all
  236. @catalogs='$(CATALOGS)'; \
  237. for cat in $$catalogs; do \
  238. cat=`basename $$cat`; \
  239. lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
  240. dir=$(localedir)/$$lang/LC_MESSAGES; \
  241. $(mkdir_p) $(DESTDIR)$$dir; \
  242. if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
  243. $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
  244. echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
  245. for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
  246. if test -n "$$lc"; then \
  247. if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
  248. link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
  249. mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  250. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  251. (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
  252. for file in *; do \
  253. if test -f $$file; then \
  254. ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
  255. fi; \
  256. done); \
  257. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  258. else \
  259. if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
  260. :; \
  261. else \
  262. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
  263. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  264. fi; \
  265. fi; \
  266. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
  267. ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
  268. ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
  269. cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
  270. echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
  271. fi; \
  272. done; \
  273. done
  274. install-strip: install
  275. installdirs: installdirs-exec installdirs-data
  276. installdirs-exec:
  277. installdirs-data: installdirs-data-@USE_NLS@
  278. if test "$(PACKAGE)" = "gettext-tools"; then \
  279. $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
  280. else \
  281. : ; \
  282. fi
  283. installdirs-data-no:
  284. installdirs-data-yes:
  285. @catalogs='$(CATALOGS)'; \
  286. for cat in $$catalogs; do \
  287. cat=`basename $$cat`; \
  288. lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
  289. dir=$(localedir)/$$lang/LC_MESSAGES; \
  290. $(mkdir_p) $(DESTDIR)$$dir; \
  291. for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
  292. if test -n "$$lc"; then \
  293. if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
  294. link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
  295. mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  296. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  297. (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
  298. for file in *; do \
  299. if test -f $$file; then \
  300. ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
  301. fi; \
  302. done); \
  303. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  304. else \
  305. if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
  306. :; \
  307. else \
  308. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
  309. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  310. fi; \
  311. fi; \
  312. fi; \
  313. done; \
  314. done
  315. # Define this as empty until I found a useful application.
  316. installcheck:
  317. uninstall: uninstall-exec uninstall-data
  318. uninstall-exec:
  319. uninstall-data: uninstall-data-@USE_NLS@
  320. if test "$(PACKAGE)" = "gettext-tools"; then \
  321. for file in $(DISTFILES.common) Makevars.template; do \
  322. rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
  323. done; \
  324. else \
  325. : ; \
  326. fi
  327. uninstall-data-no:
  328. uninstall-data-yes:
  329. catalogs='$(CATALOGS)'; \
  330. for cat in $$catalogs; do \
  331. cat=`basename $$cat`; \
  332. lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
  333. for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
  334. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
  335. done; \
  336. done
  337. check: all
  338. info dvi ps pdf html tags TAGS ctags CTAGS ID:
  339. mostlyclean:
  340. rm -f remove-potcdate.sed
  341. rm -f stamp-poT
  342. rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
  343. rm -fr *.o
  344. clean: mostlyclean
  345. distclean: clean
  346. rm -f Makefile Makefile.in POTFILES *.mo
  347. maintainer-clean: distclean
  348. @echo "This command is intended for maintainers to use;"
  349. @echo "it deletes files that may require special tools to rebuild."
  350. rm -f stamp-po $(GMOFILES)
  351. distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
  352. dist distdir:
  353. test -z "$(DISTFILESDEPS)" || $(MAKE) $(DISTFILESDEPS)
  354. @$(MAKE) dist2
  355. # This is a separate target because 'update-po' must be executed before.
  356. dist2: stamp-po $(DISTFILES)
  357. dists="$(DISTFILES)"; \
  358. if test "$(PACKAGE)" = "gettext-tools"; then \
  359. dists="$$dists Makevars.template"; \
  360. fi; \
  361. if test -f $(srcdir)/$(DOMAIN).pot; then \
  362. dists="$$dists $(DOMAIN).pot stamp-po"; \
  363. fi; \
  364. if test -f $(srcdir)/ChangeLog; then \
  365. dists="$$dists ChangeLog"; \
  366. fi; \
  367. for i in 0 1 2 3 4 5 6 7 8 9; do \
  368. if test -f $(srcdir)/ChangeLog.$$i; then \
  369. dists="$$dists ChangeLog.$$i"; \
  370. fi; \
  371. done; \
  372. if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
  373. for file in $$dists; do \
  374. if test -f $$file; then \
  375. cp -p $$file $(distdir) || exit 1; \
  376. else \
  377. cp -p $(srcdir)/$$file $(distdir) || exit 1; \
  378. fi; \
  379. done
  380. update-po: Makefile
  381. $(MAKE) $(DOMAIN).pot-update
  382. test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
  383. $(MAKE) update-gmo
  384. # General rule for creating PO files.
  385. .nop.po-create:
  386. @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
  387. echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
  388. exit 1
  389. # General rule for updating PO files.
  390. .nop.po-update:
  391. @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
  392. if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; fi; \
  393. tmpdir=`pwd`; \
  394. echo "$$lang:"; \
  395. test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
  396. echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
  397. cd $(srcdir); \
  398. if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
  399. '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
  400. $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
  401. *) \
  402. $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
  403. esac; \
  404. }; then \
  405. if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
  406. rm -f $$tmpdir/$$lang.new.po; \
  407. else \
  408. if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
  409. :; \
  410. else \
  411. echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
  412. exit 1; \
  413. fi; \
  414. fi; \
  415. else \
  416. echo "msgmerge for $$lang.po failed!" 1>&2; \
  417. rm -f $$tmpdir/$$lang.new.po; \
  418. fi
  419. $(DUMMYPOFILES):
  420. update-gmo: Makefile $(GMOFILES)
  421. @:
  422. # Recreate Makefile by invoking config.status. Explicitly invoke the shell,
  423. # because execution permission bits may not work on the current file system.
  424. # Use @SHELL@, which is the shell determined by autoconf for the use by its
  425. # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
  426. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
  427. cd $(top_builddir) \
  428. && @SHELL@ ./config.status $(subdir)/$@.in po-directories
  429. force:
  430. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  431. # Otherwise a system limit (for SysV at least) may be exceeded.
  432. .NOEXPORT: