Makefile 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  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 = jwm
  14. VERSION = 2.2.0
  15. PACKAGE_BUGREPORT = joewing@joewing.net
  16. SHELL = /bin/sh
  17. srcdir = .
  18. top_srcdir = ..
  19. prefix = /freon
  20. exec_prefix = /freon
  21. datarootdir = ${prefix}/share
  22. datadir = ${datarootdir}
  23. localedir = /freon/share/locale
  24. gettextsrcdir = $(datadir)/gettext/po
  25. INSTALL = /usr/bin/install -c
  26. INSTALL_DATA = ${INSTALL} -m 644
  27. # We use $(mkdir_p).
  28. # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
  29. # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
  30. # @install_sh@ does not start with $(SHELL), so we add it.
  31. # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
  32. # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
  33. # versions, $(mkinstalldirs) and $(install_sh) are unused.
  34. mkinstalldirs = $(SHELL) /usr/bin/install -c -d
  35. install_sh = $(SHELL) /usr/bin/install -c
  36. MKDIR_P = /bin/mkdir -p
  37. mkdir_p = /bin/mkdir -p
  38. GMSGFMT_ = /usr/bin/msgfmt
  39. GMSGFMT_no = /usr/bin/msgfmt
  40. GMSGFMT_yes = /usr/bin/msgfmt
  41. GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
  42. MSGFMT_ = /usr/bin/msgfmt
  43. MSGFMT_no = /usr/bin/msgfmt
  44. MSGFMT_yes = /usr/bin/msgfmt
  45. MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
  46. XGETTEXT_ = /usr/bin/xgettext
  47. XGETTEXT_no = /usr/bin/xgettext
  48. XGETTEXT_yes = /usr/bin/xgettext
  49. XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
  50. MSGMERGE = msgmerge
  51. MSGMERGE_UPDATE = /usr/bin/msgmerge --update
  52. MSGINIT = msginit
  53. MSGCONV = msgconv
  54. MSGFILTER = msgfilter
  55. POFILES = de.po es.po fr.po it.po nl.po pl.po pt-PT.po ru.po
  56. GMOFILES = de.gmo es.gmo fr.gmo it.gmo nl.gmo pl.gmo pt-PT.gmo ru.gmo
  57. UPDATEPOFILES = de.po-update es.po-update fr.po-update it.po-update nl.po-update pl.po-update pt-PT.po-update ru.po-update
  58. DUMMYPOFILES = de.nop es.nop fr.nop it.nop nl.nop pl.nop pt-PT.nop ru.nop
  59. DISTFILES.common = Makefile.in.in remove-potcdate.sin \
  60. $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
  61. DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
  62. $(POFILES) $(GMOFILES) \
  63. $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
  64. POTFILES = \
  65. ../src/background.c \
  66. ../src/border.c \
  67. ../src/button.c \
  68. ../src/client.c \
  69. ../src/clientlist.c \
  70. ../src/clock.c \
  71. ../src/color.c \
  72. ../src/command.c \
  73. ../src/confirm.c \
  74. ../src/cursor.c \
  75. ../src/debug.c \
  76. ../src/desktop.c \
  77. ../src/dock.c \
  78. ../src/error.c \
  79. ../src/event.c \
  80. ../src/font.c \
  81. ../src/grab.c \
  82. ../src/gradient.c \
  83. ../src/group.c \
  84. ../src/help.c \
  85. ../src/hint.c \
  86. ../src/icon.c \
  87. ../src/image.c \
  88. ../src/key.c \
  89. ../src/lex.c \
  90. ../src/main.c \
  91. ../src/match.c \
  92. ../src/menu.c \
  93. ../src/misc.c \
  94. ../src/move.c \
  95. ../src/outline.c \
  96. ../src/pager.c \
  97. ../src/parse.c \
  98. ../src/place.c \
  99. ../src/popup.c \
  100. ../src/render.c \
  101. ../src/resize.c \
  102. ../src/root.c \
  103. ../src/screen.c \
  104. ../src/settings.c \
  105. ../src/spacer.c \
  106. ../src/status.c \
  107. ../src/swallow.c \
  108. ../src/taskbar.c \
  109. ../src/timing.c \
  110. ../src/traybutton.c \
  111. ../src/tray.c \
  112. ../src/winmenu.c
  113. CATALOGS = de.gmo es.gmo fr.gmo it.gmo nl.gmo pl.gmo pt-PT.gmo ru.gmo
  114. # Makevars gets inserted here. (Don't remove this line!)
  115. # Makefile variables for PO directory in any package using GNU gettext.
  116. # Usually the message domain is the same as the package name.
  117. DOMAIN = jwm
  118. # These two variables depend on the location of this directory.
  119. subdir = po
  120. top_builddir = ..
  121. # These options get passed to xgettext.
  122. XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
  123. # This is the copyright holder that gets inserted into the header of the
  124. # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
  125. # package. (Note that the msgstr strings, extracted from the package's
  126. # sources, belong to the copyright holder of the package.) Translators are
  127. # expected to transfer the copyright for their translations to this person
  128. # or entity, or to disclaim their copyright. The empty string stands for
  129. # the public domain; in this case the translators are expected to disclaim
  130. # their copyright.
  131. COPYRIGHT_HOLDER = Free Software Foundation, Inc.
  132. # This is the email address or URL to which the translators shall report
  133. # bugs in the untranslated strings:
  134. # - Strings which are not entire sentences, see the maintainer guidelines
  135. # in the GNU gettext documentation, section 'Preparing Strings'.
  136. # - Strings which use unclear terms or require additional context to be
  137. # understood.
  138. # - Strings which make invalid assumptions about notation of date, time or
  139. # money.
  140. # - Pluralisation problems.
  141. # - Incorrect English spelling.
  142. # - Incorrect formatting.
  143. # It can be your email address, or a mailing list address where translators
  144. # can write to without being subscribed, or the URL of a web page through
  145. # which the translators can contact you.
  146. MSGID_BUGS_ADDRESS = joewing@joewing.net
  147. # This is the list of locale categories, beyond LC_MESSAGES, for which the
  148. # message catalogs shall be used. It is usually empty.
  149. EXTRA_LOCALE_CATEGORIES =
  150. .SUFFIXES:
  151. .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
  152. .po.mo:
  153. @echo "$(MSGFMT) -c -o $@ $<"; \
  154. $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
  155. .po.gmo:
  156. @lang=`echo $* | sed -e 's,.*/,,'`; \
  157. test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
  158. echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \
  159. cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
  160. .sin.sed:
  161. sed -e '/^#/d' $< > t-$@
  162. mv t-$@ $@
  163. all: check-macro-version all-yes
  164. all-yes: stamp-po
  165. all-no:
  166. # Ensure that the gettext macros and this Makefile.in.in are in sync.
  167. check-macro-version:
  168. @test "$(GETTEXT_MACRO_VERSION)" = "0.19" \
  169. || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version 0.19" 1>&2; \
  170. exit 1; \
  171. }
  172. # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
  173. # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
  174. # we don't want to bother translators with empty POT files). We assume that
  175. # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
  176. # In this case, stamp-po is a nop (i.e. a phony target).
  177. # stamp-po is a timestamp denoting the last time at which the CATALOGS have
  178. # been loosely updated. Its purpose is that when a developer or translator
  179. # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
  180. # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
  181. # invocations of "make" will do nothing. This timestamp would not be necessary
  182. # if updating the $(CATALOGS) would always touch them; however, the rule for
  183. # $(POFILES) has been designed to not touch files that don't need to be
  184. # changed.
  185. stamp-po: $(srcdir)/$(DOMAIN).pot
  186. test ! -f $(srcdir)/$(DOMAIN).pot || \
  187. test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
  188. @test ! -f $(srcdir)/$(DOMAIN).pot || { \
  189. echo "touch stamp-po" && \
  190. echo timestamp > stamp-poT && \
  191. mv stamp-poT stamp-po; \
  192. }
  193. # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
  194. # otherwise packages like GCC can not be built if only parts of the source
  195. # have been downloaded.
  196. # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
  197. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
  198. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
  199. if LC_ALL=C grep 'GNU jwm' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
  200. package_gnu='GNU '; \
  201. else \
  202. package_gnu=''; \
  203. fi; \
  204. if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
  205. msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
  206. else \
  207. msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
  208. fi; \
  209. case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
  210. '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
  211. $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
  212. --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
  213. --files-from=$(srcdir)/POTFILES.in \
  214. --copyright-holder='$(COPYRIGHT_HOLDER)' \
  215. --msgid-bugs-address="$$msgid_bugs_address" \
  216. ;; \
  217. *) \
  218. $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
  219. --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
  220. --files-from=$(srcdir)/POTFILES.in \
  221. --copyright-holder='$(COPYRIGHT_HOLDER)' \
  222. --package-name="$${package_gnu}jwm" \
  223. --package-version='2.2.0' \
  224. --msgid-bugs-address="$$msgid_bugs_address" \
  225. ;; \
  226. esac
  227. test ! -f $(DOMAIN).po || { \
  228. if test -f $(srcdir)/$(DOMAIN).pot; then \
  229. sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
  230. sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
  231. if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
  232. rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
  233. else \
  234. rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
  235. mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
  236. fi; \
  237. else \
  238. mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
  239. fi; \
  240. }
  241. # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
  242. # every "make" invocation, only create it when it is missing.
  243. # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
  244. $(srcdir)/$(DOMAIN).pot:
  245. $(MAKE) $(DOMAIN).pot-update
  246. # This target rebuilds a PO file if $(DOMAIN).pot has changed.
  247. # Note that a PO file is not touched if it doesn't need to be changed.
  248. $(POFILES): $(srcdir)/$(DOMAIN).pot
  249. @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
  250. if test -f "$(srcdir)/$${lang}.po"; then \
  251. test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
  252. echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \
  253. cd $(srcdir) \
  254. && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
  255. '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
  256. $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \
  257. *) \
  258. $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \
  259. esac; \
  260. }; \
  261. else \
  262. $(MAKE) $${lang}.po-create; \
  263. fi
  264. install: install-exec install-data
  265. install-exec:
  266. install-data: install-data-yes
  267. if test "$(PACKAGE)" = "gettext-tools"; then \
  268. $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
  269. for file in $(DISTFILES.common) Makevars.template; do \
  270. $(INSTALL_DATA) $(srcdir)/$$file \
  271. $(DESTDIR)$(gettextsrcdir)/$$file; \
  272. done; \
  273. for file in Makevars; do \
  274. rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
  275. done; \
  276. else \
  277. : ; \
  278. fi
  279. install-data-no: all
  280. install-data-yes: all
  281. @catalogs='$(CATALOGS)'; \
  282. for cat in $$catalogs; do \
  283. cat=`basename $$cat`; \
  284. lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
  285. dir=$(localedir)/$$lang/LC_MESSAGES; \
  286. $(mkdir_p) $(DESTDIR)$$dir; \
  287. if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
  288. $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
  289. echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
  290. for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
  291. if test -n "$$lc"; then \
  292. if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
  293. link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
  294. mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  295. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  296. (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
  297. for file in *; do \
  298. if test -f $$file; then \
  299. ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
  300. fi; \
  301. done); \
  302. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  303. else \
  304. if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
  305. :; \
  306. else \
  307. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
  308. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  309. fi; \
  310. fi; \
  311. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
  312. ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
  313. ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
  314. cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
  315. echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
  316. fi; \
  317. done; \
  318. done
  319. install-strip: install
  320. installdirs: installdirs-exec installdirs-data
  321. installdirs-exec:
  322. installdirs-data: installdirs-data-yes
  323. if test "$(PACKAGE)" = "gettext-tools"; then \
  324. $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
  325. else \
  326. : ; \
  327. fi
  328. installdirs-data-no:
  329. installdirs-data-yes:
  330. @catalogs='$(CATALOGS)'; \
  331. for cat in $$catalogs; do \
  332. cat=`basename $$cat`; \
  333. lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
  334. dir=$(localedir)/$$lang/LC_MESSAGES; \
  335. $(mkdir_p) $(DESTDIR)$$dir; \
  336. for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
  337. if test -n "$$lc"; then \
  338. if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
  339. link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
  340. mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  341. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  342. (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
  343. for file in *; do \
  344. if test -f $$file; then \
  345. ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
  346. fi; \
  347. done); \
  348. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
  349. else \
  350. if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
  351. :; \
  352. else \
  353. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
  354. mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
  355. fi; \
  356. fi; \
  357. fi; \
  358. done; \
  359. done
  360. # Define this as empty until I found a useful application.
  361. installcheck:
  362. uninstall: uninstall-exec uninstall-data
  363. uninstall-exec:
  364. uninstall-data: uninstall-data-yes
  365. if test "$(PACKAGE)" = "gettext-tools"; then \
  366. for file in $(DISTFILES.common) Makevars.template; do \
  367. rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
  368. done; \
  369. else \
  370. : ; \
  371. fi
  372. uninstall-data-no:
  373. uninstall-data-yes:
  374. catalogs='$(CATALOGS)'; \
  375. for cat in $$catalogs; do \
  376. cat=`basename $$cat`; \
  377. lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
  378. for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
  379. rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
  380. done; \
  381. done
  382. check: all
  383. info dvi ps pdf html tags TAGS ctags CTAGS ID:
  384. mostlyclean:
  385. rm -f remove-potcdate.sed
  386. rm -f stamp-poT
  387. rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
  388. rm -fr *.o
  389. clean: mostlyclean
  390. distclean: clean
  391. rm -f Makefile Makefile.in POTFILES *.mo
  392. maintainer-clean: distclean
  393. @echo "This command is intended for maintainers to use;"
  394. @echo "it deletes files that may require special tools to rebuild."
  395. rm -f stamp-po $(GMOFILES)
  396. distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
  397. dist distdir:
  398. $(MAKE) update-po
  399. @$(MAKE) dist2
  400. # This is a separate target because 'update-po' must be executed before.
  401. dist2: stamp-po $(DISTFILES)
  402. dists="$(DISTFILES)"; \
  403. if test "$(PACKAGE)" = "gettext-tools"; then \
  404. dists="$$dists Makevars.template"; \
  405. fi; \
  406. if test -f $(srcdir)/$(DOMAIN).pot; then \
  407. dists="$$dists $(DOMAIN).pot stamp-po"; \
  408. fi; \
  409. if test -f $(srcdir)/ChangeLog; then \
  410. dists="$$dists ChangeLog"; \
  411. fi; \
  412. for i in 0 1 2 3 4 5 6 7 8 9; do \
  413. if test -f $(srcdir)/ChangeLog.$$i; then \
  414. dists="$$dists ChangeLog.$$i"; \
  415. fi; \
  416. done; \
  417. if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
  418. for file in $$dists; do \
  419. if test -f $$file; then \
  420. cp -p $$file $(distdir) || exit 1; \
  421. else \
  422. cp -p $(srcdir)/$$file $(distdir) || exit 1; \
  423. fi; \
  424. done
  425. update-po: Makefile
  426. $(MAKE) $(DOMAIN).pot-update
  427. test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
  428. $(MAKE) update-gmo
  429. # General rule for creating PO files.
  430. .nop.po-create:
  431. @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
  432. echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
  433. exit 1
  434. # General rule for updating PO files.
  435. .nop.po-update:
  436. @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
  437. if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
  438. tmpdir=`pwd`; \
  439. echo "$$lang:"; \
  440. test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
  441. echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
  442. cd $(srcdir); \
  443. if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
  444. '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \
  445. $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
  446. *) \
  447. $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \
  448. esac; \
  449. }; then \
  450. if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
  451. rm -f $$tmpdir/$$lang.new.po; \
  452. else \
  453. if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
  454. :; \
  455. else \
  456. echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
  457. exit 1; \
  458. fi; \
  459. fi; \
  460. else \
  461. echo "msgmerge for $$lang.po failed!" 1>&2; \
  462. rm -f $$tmpdir/$$lang.new.po; \
  463. fi
  464. $(DUMMYPOFILES):
  465. update-gmo: Makefile $(GMOFILES)
  466. @:
  467. # Recreate Makefile by invoking config.status. Explicitly invoke the shell,
  468. # because execution permission bits may not work on the current file system.
  469. # Use /bin/bash, which is the shell determined by autoconf for the use by its
  470. # scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient.
  471. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status POTFILES.in LINGUAS
  472. cd $(top_builddir) \
  473. && /bin/bash ./config.status $(subdir)/$@.in po-directories
  474. force:
  475. # Tell versions [3.59,3.63) of GNU make not to export all variables.
  476. # Otherwise a system limit (for SysV at least) may be exceeded.
  477. .NOEXPORT:
  478. # Special Makefile rules for English message catalogs with quotation marks.
  479. DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
  480. .SUFFIXES: .insert-header .po-update-en
  481. en@quot.po-create:
  482. $(MAKE) en@quot.po-update
  483. en@boldquot.po-create:
  484. $(MAKE) en@boldquot.po-update
  485. en@quot.po-update: en@quot.po-update-en
  486. en@boldquot.po-update: en@boldquot.po-update-en
  487. .insert-header.po-update-en:
  488. @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
  489. if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
  490. tmpdir=`pwd`; \
  491. echo "$$lang:"; \
  492. ll=`echo $$lang | sed -e 's/@.*//'`; \
  493. LC_ALL=C; export LC_ALL; \
  494. cd $(srcdir); \
  495. if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
  496. if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
  497. rm -f $$tmpdir/$$lang.new.po; \
  498. else \
  499. if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
  500. :; \
  501. else \
  502. echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
  503. exit 1; \
  504. fi; \
  505. fi; \
  506. else \
  507. echo "creation of $$lang.po failed!" 1>&2; \
  508. rm -f $$tmpdir/$$lang.new.po; \
  509. fi
  510. en@quot.insert-header: insert-header.sin
  511. sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
  512. en@boldquot.insert-header: insert-header.sin
  513. sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
  514. mostlyclean: mostlyclean-quot
  515. mostlyclean-quot:
  516. rm -f *.insert-header