Code

Fix for regex input of '|', being output causing problems with Nagios' parsing of
[nagiosplug.git] / po / Makefile.in.in
1 # -*- buffer-read-only: t -*- vi: set ro:
2 # DO NOT EDIT! GENERATED AUTOMATICALLY!
3 # Makefile for PO directory in any package using GNU gettext.
4 # Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
5 #
6 # This file can be copied and used freely without restrictions.  It can
7 # be used in projects which are not available under the GNU General Public
8 # License but which still want to provide support for the GNU gettext
9 # functionality.
10 # Please note that the actual code of GNU gettext is covered by the GNU
11 # General Public License and is *not* in the public domain.
12 #
13 # Origin: gettext-0.15
15 PACKAGE = @PACKAGE@
16 VERSION = @VERSION@
17 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
19 SHELL = /bin/sh
20 @SET_MAKE@
22 srcdir = @srcdir@
23 top_srcdir = @top_srcdir@
24 VPATH = @srcdir@
26 prefix = @prefix@
27 exec_prefix = @exec_prefix@
28 datarootdir = @datarootdir@
29 datadir = @datadir@
30 localedir = @localedir@
31 gettextsrcdir = $(datadir)/gettext/po
33 INSTALL = @INSTALL@
34 INSTALL_DATA = @INSTALL_DATA@
35 mkinstalldirs = $(SHELL) @install_sh@ -d
36 mkdir_p = @mkdir_p@
38 GMSGFMT_ = @GMSGFMT@
39 GMSGFMT_no = @GMSGFMT@
40 GMSGFMT_yes = @GMSGFMT_015@
41 GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
42 MSGFMT_ = @MSGFMT@
43 MSGFMT_no = @MSGFMT@
44 MSGFMT_yes = @MSGFMT_015@
45 MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
46 XGETTEXT_ = @XGETTEXT@
47 XGETTEXT_no = @XGETTEXT@
48 XGETTEXT_yes = @XGETTEXT_015@
49 XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
50 MSGMERGE = msgmerge
51 MSGMERGE_UPDATE = @MSGMERGE@ --update
52 MSGINIT = msginit
53 MSGCONV = msgconv
54 MSGFILTER = msgfilter
56 POFILES = @POFILES@
57 GMOFILES = @GMOFILES@
58 UPDATEPOFILES = @UPDATEPOFILES@
59 DUMMYPOFILES = @DUMMYPOFILES@
60 DISTFILES.common = Makefile.in.in remove-potcdate.sin \
61 $(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
62 DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
63 $(POFILES) $(GMOFILES) \
64 $(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
66 POTFILES = \
68 CATALOGS = @CATALOGS@
70 # Makevars gets inserted here. (Don't remove this line!)
72 .SUFFIXES:
73 .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
75 .po.mo:
76         @echo "$(MSGFMT) -c -o $@ $<"; \
77         $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
79 .po.gmo:
80         @lang=`echo $* | sed -e 's,.*/,,'`; \
81         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
82         echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
83         cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
85 .sin.sed:
86         sed -e '/^#/d' $< > t-$@
87         mv t-$@ $@
90 all: all-@USE_NLS@
92 all-yes: stamp-po
93 all-no:
95 # $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
96 # internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
97 # we don't want to bother translators with empty POT files). We assume that
98 # LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
99 # In this case, stamp-po is a nop (i.e. a phony target).
101 # stamp-po is a timestamp denoting the last time at which the CATALOGS have
102 # been loosely updated. Its purpose is that when a developer or translator
103 # checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
104 # "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
105 # invocations of "make" will do nothing. This timestamp would not be necessary
106 # if updating the $(CATALOGS) would always touch them; however, the rule for
107 # $(POFILES) has been designed to not touch files that don't need to be
108 # changed.
109 stamp-po: $(srcdir)/$(DOMAIN).pot
110         test ! -f $(srcdir)/$(DOMAIN).pot || \
111           test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
112         @test ! -f $(srcdir)/$(DOMAIN).pot || { \
113           echo "touch stamp-po" && \
114           echo timestamp > stamp-poT && \
115           mv stamp-poT stamp-po; \
116         }
118 # Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
119 # otherwise packages like GCC can not be built if only parts of the source
120 # have been downloaded.
122 # This target rebuilds $(DOMAIN).pot; it is an expensive operation.
123 # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
124 $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
125         if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
126           msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
127         else \
128           msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
129         fi; \
130         $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
131           --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
132           --files-from=$(srcdir)/POTFILES.in \
133           --copyright-holder='$(COPYRIGHT_HOLDER)' \
134           --msgid-bugs-address="$$msgid_bugs_address"
135         test ! -f $(DOMAIN).po || { \
136           if test -f $(srcdir)/$(DOMAIN).pot; then \
137             sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
138             sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
139             if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
140               rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
141             else \
142               rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
143               mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
144             fi; \
145           else \
146             mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
147           fi; \
148         }
150 # This rule has no dependencies: we don't need to update $(DOMAIN).pot at
151 # every "make" invocation, only create it when it is missing.
152 # Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
153 $(srcdir)/$(DOMAIN).pot:
154         $(MAKE) $(DOMAIN).pot-update
156 # This target rebuilds a PO file if $(DOMAIN).pot has changed.
157 # Note that a PO file is not touched if it doesn't need to be changed.
158 $(POFILES): $(srcdir)/$(DOMAIN).pot
159         @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
160         if test -f "$(srcdir)/$${lang}.po"; then \
161           test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
162           echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
163           cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
164         else \
165           $(MAKE) $${lang}.po-create; \
166         fi
169 install: install-exec install-data
170 install-exec:
171 install-data: install-data-@USE_NLS@
172         if test "$(PACKAGE)" = "gettext-tools"; then \
173           $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
174           for file in $(DISTFILES.common) Makevars.template; do \
175             $(INSTALL_DATA) $(srcdir)/$$file \
176                             $(DESTDIR)$(gettextsrcdir)/$$file; \
177           done; \
178           for file in Makevars; do \
179             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
180           done; \
181         else \
182           : ; \
183         fi
184 install-data-no: all
185 install-data-yes: all
186         $(mkdir_p) $(DESTDIR)$(datadir)
187         @catalogs='$(CATALOGS)'; \
188         for cat in $$catalogs; do \
189           cat=`basename $$cat`; \
190           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
191           dir=$(localedir)/$$lang/LC_MESSAGES; \
192           $(mkdir_p) $(DESTDIR)$$dir; \
193           if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
194           $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
195           echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
196           for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
197             if test -n "$$lc"; then \
198               if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
199                 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
200                 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
201                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
202                 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
203                  for file in *; do \
204                    if test -f $$file; then \
205                      ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
206                    fi; \
207                  done); \
208                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
209               else \
210                 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
211                   :; \
212                 else \
213                   rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
214                   mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
215                 fi; \
216               fi; \
217               rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
218               ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
219               ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
220               cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
221               echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
222             fi; \
223           done; \
224         done
226 install-strip: install
228 installdirs: installdirs-exec installdirs-data
229 installdirs-exec:
230 installdirs-data: installdirs-data-@USE_NLS@
231         if test "$(PACKAGE)" = "gettext-tools"; then \
232           $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
233         else \
234           : ; \
235         fi
236 installdirs-data-no:
237 installdirs-data-yes:
238         $(mkdir_p) $(DESTDIR)$(datadir)
239         @catalogs='$(CATALOGS)'; \
240         for cat in $$catalogs; do \
241           cat=`basename $$cat`; \
242           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
243           dir=$(localedir)/$$lang/LC_MESSAGES; \
244           $(mkdir_p) $(DESTDIR)$$dir; \
245           for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
246             if test -n "$$lc"; then \
247               if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
248                 link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
249                 mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
250                 mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
251                 (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
252                  for file in *; do \
253                    if test -f $$file; then \
254                      ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
255                    fi; \
256                  done); \
257                 rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
258               else \
259                 if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
260                   :; \
261                 else \
262                   rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
263                   mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
264                 fi; \
265               fi; \
266             fi; \
267           done; \
268         done
270 # Define this as empty until I found a useful application.
271 installcheck:
273 uninstall: uninstall-exec uninstall-data
274 uninstall-exec:
275 uninstall-data: uninstall-data-@USE_NLS@
276         if test "$(PACKAGE)" = "gettext-tools"; then \
277           for file in $(DISTFILES.common) Makevars.template; do \
278             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
279           done; \
280         else \
281           : ; \
282         fi
283 uninstall-data-no:
284 uninstall-data-yes:
285         catalogs='$(CATALOGS)'; \
286         for cat in $$catalogs; do \
287           cat=`basename $$cat`; \
288           lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
289           for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
290             rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
291           done; \
292         done
294 check: all
296 info dvi ps pdf html tags TAGS ctags CTAGS ID:
298 mostlyclean:
299         rm -f remove-potcdate.sed
300         rm -f stamp-poT
301         rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
302         rm -fr *.o
304 clean: mostlyclean
306 distclean: clean
307         rm -f Makefile Makefile.in POTFILES *.mo
309 maintainer-clean: distclean
310         @echo "This command is intended for maintainers to use;"
311         @echo "it deletes files that may require special tools to rebuild."
312         rm -f stamp-po $(GMOFILES)
314 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
315 dist distdir:
316         $(MAKE) update-po
317         @$(MAKE) dist2
318 # This is a separate target because 'update-po' must be executed before.
319 dist2: stamp-po $(DISTFILES)
320         dists="$(DISTFILES)"; \
321         if test "$(PACKAGE)" = "gettext-tools"; then \
322           dists="$$dists Makevars.template"; \
323         fi; \
324         if test -f $(srcdir)/$(DOMAIN).pot; then \
325           dists="$$dists $(DOMAIN).pot stamp-po"; \
326         fi; \
327         if test -f $(srcdir)/ChangeLog; then \
328           dists="$$dists ChangeLog"; \
329         fi; \
330         for i in 0 1 2 3 4 5 6 7 8 9; do \
331           if test -f $(srcdir)/ChangeLog.$$i; then \
332             dists="$$dists ChangeLog.$$i"; \
333           fi; \
334         done; \
335         if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
336         for file in $$dists; do \
337           if test -f $$file; then \
338             cp -p $$file $(distdir) || exit 1; \
339           else \
340             cp -p $(srcdir)/$$file $(distdir) || exit 1; \
341           fi; \
342         done
344 update-po: Makefile
345         $(MAKE) $(DOMAIN).pot-update
346         test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
347         $(MAKE) update-gmo
349 # General rule for creating PO files.
351 .nop.po-create:
352         @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
353         echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
354         exit 1
356 # General rule for updating PO files.
358 .nop.po-update:
359         @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
360         if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
361         tmpdir=`pwd`; \
362         echo "$$lang:"; \
363         test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
364         echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
365         cd $(srcdir); \
366         if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
367           if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
368             rm -f $$tmpdir/$$lang.new.po; \
369           else \
370             if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
371               :; \
372             else \
373               echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
374               exit 1; \
375             fi; \
376           fi; \
377         else \
378           echo "msgmerge for $$lang.po failed!" 1>&2; \
379           rm -f $$tmpdir/$$lang.new.po; \
380         fi
382 $(DUMMYPOFILES):
384 update-gmo: Makefile $(GMOFILES)
385         @:
387 Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
388         cd $(top_builddir) \
389           && $(SHELL) ./config.status $(subdir)/$@.in po-directories
391 force:
393 # Tell versions [3.59,3.63) of GNU make not to export all variables.
394 # Otherwise a system limit (for SysV at least) may be exceeded.
395 .NOEXPORT: