~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to po/Makefile.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
12
 
GETTEXT_MACRO_VERSION = 0.17
 
1
# Makefile for program source directory in GNU NLS utilities package.
 
2
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
 
3
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
 
4
#
 
5
# This file may be copied and used freely without restrictions.  It may
 
6
# be used in projects which are not available under a GNU Public License,
 
7
# but which still want to provide support for the GNU gettext functionality.
 
8
#
 
9
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
 
10
#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
 
11
#
 
12
# - Modified by jacob berkman <jacob@ximian.com> to install
 
13
#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
 
14
#
 
15
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
 
16
#
 
17
# We have the following line for use by intltoolize:
 
18
# INTLTOOL_MAKEFILE
13
19
 
 
20
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
14
21
PACKAGE = @PACKAGE@
15
22
VERSION = @VERSION@
16
 
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
17
23
 
18
 
SHELL = /bin/sh
19
 
@SET_MAKE@
 
24
SHELL = @SHELL@
20
25
 
21
26
srcdir = @srcdir@
22
27
top_srcdir = @top_srcdir@
 
28
top_builddir = @top_builddir@
23
29
VPATH = @srcdir@
24
30
 
25
31
prefix = @prefix@
26
32
exec_prefix = @exec_prefix@
 
33
datadir = @datadir@
27
34
datarootdir = @datarootdir@
28
 
datadir = @datadir@
29
 
localedir = @localedir@
30
 
gettextsrcdir = $(datadir)/gettext/po
 
35
libdir = @libdir@
 
36
DATADIRNAME = @DATADIRNAME@
 
37
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
 
38
subdir = po
 
39
install_sh = @install_sh@
 
40
# Automake >= 1.8 provides @mkdir_p@.
 
41
# Until it can be supposed, use the safe fallback:
 
42
mkdir_p = $(install_sh) -d
31
43
 
32
44
INSTALL = @INSTALL@
33
45
INSTALL_DATA = @INSTALL_DATA@
34
46
 
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
 
# @install_sh@ does not start with $(SHELL), so we add it.
39
 
# In automake >= 1.10, @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) @install_sh@ -d
43
 
install_sh = $(SHELL) @install_sh@
44
 
MKDIR_P = @MKDIR_P@
45
 
mkdir_p = @mkdir_p@
46
 
 
47
 
GMSGFMT_ = @GMSGFMT@
48
 
GMSGFMT_no = @GMSGFMT@
49
 
GMSGFMT_yes = @GMSGFMT_015@
50
 
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
51
 
MSGFMT_ = @MSGFMT@
52
 
MSGFMT_no = @MSGFMT@
53
 
MSGFMT_yes = @MSGFMT_015@
54
 
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
55
 
XGETTEXT_ = @XGETTEXT@
56
 
XGETTEXT_no = @XGETTEXT@
57
 
XGETTEXT_yes = @XGETTEXT_015@
58
 
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
59
 
MSGMERGE = @MSGMERGE@
60
 
MSGMERGE_UPDATE = @MSGMERGE@ --update
61
 
MSGINIT = msginit
62
 
MSGCONV = msgconv
63
 
MSGFILTER = msgfilter
64
 
 
65
 
POFILES = @POFILES@
66
 
GMOFILES = @GMOFILES@
67
 
UPDATEPOFILES = @UPDATEPOFILES@
68
 
DUMMYPOFILES = @DUMMYPOFILES@
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)
 
47
GMSGFMT = @GMSGFMT@
 
48
MSGFMT = @MSGFMT@
 
49
XGETTEXT = @XGETTEXT@
 
50
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 
51
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 
52
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) XGETTEXT=$(XGETTEXT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
 
53
GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) XGETTEXT=$(XGETTEXT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
 
54
 
 
55
ALL_LINGUAS = @ALL_LINGUAS@
 
56
 
 
57
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
 
58
 
 
59
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
 
60
 
 
61
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
 
62
 
 
63
POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
 
64
 
 
65
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
 
66
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
74
67
 
75
68
POTFILES = \
76
 
 
77
 
CATALOGS = @CATALOGS@
78
 
 
79
 
# Makevars gets inserted here. (Don't remove this line!)
 
69
# This comment gets stripped out
 
70
 
 
71
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
80
72
 
81
73
.SUFFIXES:
82
 
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
 
74
.SUFFIXES: .po .pox .gmo .mo .msg .cat
 
75
 
 
76
.po.pox:
 
77
        $(MAKE) $(GETTEXT_PACKAGE).pot
 
78
        $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
83
79
 
84
80
.po.mo:
85
 
        @echo "$(MSGFMT) -c -o $@ $<"; \
86
 
        $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
 
81
        $(MSGFMT) -o $@ $<
87
82
 
88
83
.po.gmo:
89
 
        @lang=`echo $* | sed -e 's,.*/,,'`; \
90
 
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
91
 
        echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
92
 
        cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
93
 
 
94
 
.sin.sed:
95
 
        sed -e '/^#/d' $< > t-$@
96
 
        mv t-$@ $@
97
 
 
98
 
 
99
 
all: check-macro-version all-@USE_NLS@
100
 
 
101
 
all-yes: stamp-po
 
84
        file=`echo $* | sed 's,.*/,,'`.gmo \
 
85
          && rm -f $$file && $(GMSGFMT) -o $$file $<
 
86
 
 
87
.po.cat:
 
88
        sed -f ../intl/po2msg.sed < $< > $*.msg \
 
89
          && rm -f $@ && gencat $@ $*.msg
 
90
 
 
91
 
 
92
all: all-@USE_NLS@
 
93
 
 
94
all-yes: $(CATALOGS)
102
95
all-no:
103
96
 
104
 
# Ensure that the gettext macros and this Makefile.in.in are in sync.
105
 
check-macro-version:
106
 
        @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
107
 
          || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \
108
 
               exit 1; \
109
 
             }
110
 
 
111
 
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
112
 
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
113
 
# we don't want to bother translators with empty POT files). We assume that
114
 
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
115
 
# In this case, stamp-po is a nop (i.e. a phony target).
116
 
 
117
 
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
118
 
# been loosely updated. Its purpose is that when a developer or translator
119
 
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
120
 
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
121
 
# invocations of "make" will do nothing. This timestamp would not be necessary
122
 
# if updating the $(CATALOGS) would always touch them; however, the rule for
123
 
# $(POFILES) has been designed to not touch files that don't need to be
124
 
# changed.
125
 
stamp-po: $(srcdir)/$(DOMAIN).pot
126
 
        test ! -f $(srcdir)/$(DOMAIN).pot || \
127
 
          test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
128
 
        @test ! -f $(srcdir)/$(DOMAIN).pot || { \
129
 
          echo "touch stamp-po" && \
130
 
          echo timestamp > stamp-poT && \
131
 
          mv stamp-poT stamp-po; \
132
 
        }
133
 
 
134
 
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
135
 
# otherwise packages like GCC can not be built if only parts of the source
136
 
# have been downloaded.
137
 
 
138
 
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
139
 
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
140
 
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
141
 
        if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
142
 
          package_gnu='GNU '; \
143
 
        else \
144
 
          package_gnu=''; \
145
 
        fi; \
146
 
        if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
147
 
          msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
148
 
        else \
149
 
          msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
150
 
        fi; \
151
 
        case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
152
 
          '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
153
 
            $(XGETTEXT) --no-location --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
154
 
              --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
155
 
              --files-from=$(srcdir)/POTFILES.in \
156
 
              --copyright-holder='$(COPYRIGHT_HOLDER)' \
157
 
              --msgid-bugs-address="$$msgid_bugs_address" \
158
 
            ;; \
159
 
          *) \
160
 
            $(XGETTEXT) --no-location --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
161
 
              --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
162
 
              --files-from=$(srcdir)/POTFILES.in \
163
 
              --copyright-holder='$(COPYRIGHT_HOLDER)' \
164
 
              --package-name="$${package_gnu}@PACKAGE@" \
165
 
              --package-version='@VERSION@' \
166
 
              --msgid-bugs-address="$$msgid_bugs_address" \
167
 
            ;; \
168
 
        esac
169
 
        test ! -f $(DOMAIN).po || { \
170
 
          if test -f $(srcdir)/$(DOMAIN).pot; then \
171
 
            sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
172
 
            sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
173
 
            if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
174
 
              rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
175
 
            else \
176
 
              mv $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
177
 
              rm -f $(DOMAIN).po $(DOMAIN).1po; \
178
 
            fi; \
179
 
          else \
180
 
            sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).1po; \
181
 
            mv $(DOMAIN).1po $(srcdir)/$(DOMAIN).pot; \
182
 
            rm -f $(DOMAIN).po; \
183
 
          fi; \
184
 
        }
185
 
 
186
 
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
187
 
# every "make" invocation, only create it when it is missing.
188
 
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
189
 
$(srcdir)/$(DOMAIN).pot:
190
 
        $(MAKE) $(DOMAIN).pot-update
191
 
 
192
 
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
193
 
# Note that a PO file is not touched if it doesn't need to be changed.
194
 
$(POFILES): $(srcdir)/$(DOMAIN).pot
195
 
        @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
196
 
        if test -f "$(srcdir)/$${lang}.po"; then \
197
 
          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
198
 
          echo "$${cdcmd}$(MSGMERGE_UPDATE) --no-location $${lang}.po $(DOMAIN).pot"; \
199
 
          cd $(srcdir) && $(MSGMERGE_UPDATE) --no-location $${lang}.po $(DOMAIN).pot; \
200
 
        else \
201
 
          $(MAKE) $${lang}.po-create; \
202
 
        fi
203
 
 
204
 
 
205
 
install: install-exec install-data
206
 
install-exec:
 
97
$(GETTEXT_PACKAGE).pot: $(POTFILES)
 
98
        $(GENPOT)
 
99
 
 
100
install: install-data
207
101
install-data: install-data-@USE_NLS@
208
 
        if test "$(PACKAGE)" = "gettext-tools"; then \
209
 
          $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
210
 
          for file in $(DISTFILES.common) Makevars.template; do \
211
 
            $(INSTALL_DATA) $(srcdir)/$$file \
212
 
                            $(DESTDIR)$(gettextsrcdir)/$$file; \
213
 
          done; \
214
 
          for file in Makevars; do \
215
 
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
216
 
          done; \
217
 
        else \
218
 
          : ; \
219
 
        fi
220
102
install-data-no: all
221
103
install-data-yes: all
222
 
        $(mkdir_p) $(DESTDIR)$(datadir)
223
 
        @catalogs='$(CATALOGS)'; \
224
 
        for cat in $$catalogs; do \
225
 
          cat=`basename $$cat`; \
226
 
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
227
 
          dir=$(localedir)/$$lang/LC_MESSAGES; \
228
 
          $(mkdir_p) $(DESTDIR)$$dir; \
229
 
          if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
230
 
          $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
231
 
          echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
232
 
          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
233
 
            if test -n "$$lc"; then \
234
 
              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
235
 
                link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
236
 
                mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
237
 
                mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
238
 
                (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
239
 
                 for file in *; do \
240
 
                   if test -f $$file; then \
241
 
                     ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
242
 
                   fi; \
243
 
                 done); \
244
 
                rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
245
 
              else \
246
 
                if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
247
 
                  :; \
248
 
                else \
249
 
                  rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
250
 
                  mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
251
 
                fi; \
252
 
              fi; \
253
 
              rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
254
 
              ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
255
 
              ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
256
 
              cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
257
 
              echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
258
 
            fi; \
259
 
          done; \
260
 
        done
261
 
 
262
 
install-strip: install
263
 
 
264
 
installdirs: installdirs-exec installdirs-data
265
 
installdirs-exec:
266
 
installdirs-data: installdirs-data-@USE_NLS@
267
 
        if test "$(PACKAGE)" = "gettext-tools"; then \
268
 
          $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
269
 
        else \
270
 
          : ; \
271
 
        fi
272
 
installdirs-data-no:
273
 
installdirs-data-yes:
274
 
        $(mkdir_p) $(DESTDIR)$(datadir)
275
 
        @catalogs='$(CATALOGS)'; \
276
 
        for cat in $$catalogs; do \
277
 
          cat=`basename $$cat`; \
278
 
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
279
 
          dir=$(localedir)/$$lang/LC_MESSAGES; \
280
 
          $(mkdir_p) $(DESTDIR)$$dir; \
281
 
          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
282
 
            if test -n "$$lc"; then \
283
 
              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
284
 
                link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
285
 
                mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
286
 
                mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
287
 
                (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
288
 
                 for file in *; do \
289
 
                   if test -f $$file; then \
290
 
                     ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
291
 
                   fi; \
292
 
                 done); \
293
 
                rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
294
 
              else \
295
 
                if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
296
 
                  :; \
297
 
                else \
298
 
                  rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
299
 
                  mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
300
 
                fi; \
301
 
              fi; \
302
 
            fi; \
303
 
          done; \
304
 
        done
 
104
        linguas="$(USE_LINGUAS)"; \
 
105
        for lang in $$linguas; do \
 
106
          dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
 
107
          $(mkdir_p) $$dir; \
 
108
          if test -r $$lang.gmo; then \
 
109
            $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
110
            echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
 
111
          else \
 
112
            $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
113
            echo "installing $(srcdir)/$$lang.gmo as" \
 
114
                 "$$dir/$(GETTEXT_PACKAGE).mo"; \
 
115
          fi; \
 
116
          if test -r $$lang.gmo.m; then \
 
117
            $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
118
            echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
119
          else \
 
120
            if test -r $(srcdir)/$$lang.gmo.m ; then \
 
121
              $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
 
122
                $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
123
              echo "installing $(srcdir)/$$lang.gmo.m as" \
 
124
                   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
125
            else \
 
126
              true; \
 
127
            fi; \
 
128
          fi; \
 
129
        done
 
130
 
 
131
# Empty stubs to satisfy archaic automake needs
 
132
dvi info ctags tags CTAGS TAGS ID:
305
133
 
306
134
# Define this as empty until I found a useful application.
307
 
installcheck:
 
135
install-exec installcheck:
308
136
 
309
 
uninstall: uninstall-exec uninstall-data
310
 
uninstall-exec:
311
 
uninstall-data: uninstall-data-@USE_NLS@
312
 
        if test "$(PACKAGE)" = "gettext-tools"; then \
313
 
          for file in $(DISTFILES.common) Makevars.template; do \
314
 
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
315
 
          done; \
316
 
        else \
317
 
          : ; \
318
 
        fi
319
 
uninstall-data-no:
320
 
uninstall-data-yes:
321
 
        catalogs='$(CATALOGS)'; \
322
 
        for cat in $$catalogs; do \
323
 
          cat=`basename $$cat`; \
324
 
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
325
 
          for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
326
 
            rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
327
 
          done; \
 
137
uninstall:
 
138
        linguas="$(USE_LINGUAS)"; \
 
139
        for lang in $$linguas; do \
 
140
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
 
141
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
328
142
        done
329
143
 
330
 
check: all
331
 
 
332
 
info dvi ps pdf html tags TAGS ctags CTAGS ID:
 
144
check: all $(GETTEXT_PACKAGE).pot
 
145
        rm -f missing notexist
333
146
 
334
147
mostlyclean:
335
 
        rm -f remove-potcdate.sed
336
 
        rm -f stamp-poT
337
 
        rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
338
 
        rm -fr *.o
 
148
        rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
 
149
        rm -f .intltool-merge-cache
339
150
 
340
151
clean: mostlyclean
341
152
 
342
153
distclean: clean
343
 
        rm -f Makefile Makefile.in POTFILES *.mo
 
154
        rm -f Makefile Makefile.in POTFILES stamp-it
 
155
        rm -f *.mo *.msg *.cat *.cat.m *.gmo
344
156
 
345
157
maintainer-clean: distclean
346
158
        @echo "This command is intended for maintainers to use;"
347
159
        @echo "it deletes files that may require special tools to rebuild."
348
 
        rm -f stamp-po $(GMOFILES)
 
160
        rm -f Makefile.in.in
349
161
 
350
 
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
351
 
dist distdir:
352
 
        $(MAKE) update-po
353
 
        @$(MAKE) dist2
354
 
# This is a separate target because 'update-po' must be executed before.
355
 
dist2: stamp-po $(DISTFILES)
 
162
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
 
163
dist distdir: $(DISTFILES)
356
164
        dists="$(DISTFILES)"; \
357
 
        if test "$(PACKAGE)" = "gettext-tools"; then \
358
 
          dists="$$dists Makevars.template"; \
359
 
        fi; \
360
 
        if test -f $(srcdir)/$(DOMAIN).pot; then \
361
 
          dists="$$dists $(DOMAIN).pot stamp-po"; \
362
 
        fi; \
363
 
        if test -f $(srcdir)/ChangeLog; then \
364
 
          dists="$$dists ChangeLog"; \
365
 
        fi; \
366
 
        for i in 0 1 2 3 4 5 6 7 8 9; do \
367
 
          if test -f $(srcdir)/ChangeLog.$$i; then \
368
 
            dists="$$dists ChangeLog.$$i"; \
369
 
          fi; \
 
165
        extra_dists="$(EXTRA_DISTFILES)"; \
 
166
        for file in $$extra_dists; do \
 
167
          test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
370
168
        done; \
371
 
        if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
372
169
        for file in $$dists; do \
373
 
          if test -f $$file; then \
374
 
            cp -p $$file $(distdir) || exit 1; \
375
 
          else \
376
 
            cp -p $(srcdir)/$$file $(distdir) || exit 1; \
377
 
          fi; \
 
170
          test -f $$file || file="$(srcdir)/$$file"; \
 
171
          ln $$file $(distdir) 2> /dev/null \
 
172
            || cp -p $$file $(distdir); \
378
173
        done
379
174
 
380
175
update-po: Makefile
381
 
        $(MAKE) $(DOMAIN).pot-update
382
 
        test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
383
 
        $(MAKE) update-gmo
384
 
 
385
 
# General rule for creating PO files.
386
 
 
387
 
.nop.po-create:
388
 
        @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
389
 
        echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
390
 
        exit 1
391
 
 
392
 
# General rule for updating PO files.
393
 
 
394
 
.nop.po-update:
395
 
        @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
396
 
        if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
 
176
        $(MAKE) $(GETTEXT_PACKAGE).pot
397
177
        tmpdir=`pwd`; \
398
 
        echo "$$lang:"; \
399
 
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
400
 
        echo "$${cdcmd}$(MSGMERGE) --no-location $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
401
 
        cd $(srcdir); \
402
 
        if $(MSGMERGE) --no-location $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
403
 
          if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 
178
        linguas="$(USE_LINGUAS)"; \
 
179
        for lang in $$linguas; do \
 
180
          echo "$$lang:"; \
 
181
          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
 
182
          if $$result; then \
 
183
            if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 
184
              rm -f $$tmpdir/$$lang.new.po; \
 
185
            else \
 
186
              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
 
187
                :; \
 
188
              else \
 
189
                echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
 
190
                rm -f $$tmpdir/$$lang.new.po; \
 
191
                exit 1; \
 
192
              fi; \
 
193
            fi; \
 
194
          else \
 
195
            echo "msgmerge for $$lang.gmo failed!"; \
404
196
            rm -f $$tmpdir/$$lang.new.po; \
405
 
          else \
406
 
            if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
407
 
              :; \
408
 
            else \
409
 
              echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
410
 
              exit 1; \
411
 
            fi; \
412
197
          fi; \
413
 
        else \
414
 
          echo "msgmerge for $$lang.po failed!" 1>&2; \
415
 
          rm -f $$tmpdir/$$lang.new.po; \
 
198
        done
 
199
 
 
200
Makefile POTFILES: stamp-it
 
201
        @if test ! -f $@; then \
 
202
          rm -f stamp-it; \
 
203
          $(MAKE) stamp-it; \
416
204
        fi
417
205
 
418
 
$(DUMMYPOFILES):
419
 
 
420
 
update-gmo: Makefile $(GMOFILES)
421
 
        @:
422
 
 
423
 
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
 
206
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
424
207
        cd $(top_builddir) \
425
 
          && $(SHELL) ./config.status $(subdir)/$@.in po-directories
 
208
          && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
 
209
               $(SHELL) ./config.status
426
210
 
427
 
force:
 
211
# We need one of these so we don't break if the html rule is used.
 
212
html:
428
213
 
429
214
# Tell versions [3.59,3.63) of GNU make not to export all variables.
430
215
# Otherwise a system limit (for SysV at least) may be exceeded.