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