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