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