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