Makefile.in.in 18 KB

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