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