Makefile.in.in 17 KB

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