~ubuntu-branches/ubuntu/natty/diffutils/natty

« back to all changes in this revision

Viewing changes to po/Makefile.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Santiago Vila
  • Date: 2010-05-04 20:38:00 UTC
  • mfrom: (2.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100504203800-f67xd9rsa9xl9qqj
Tags: 1:3.0-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- buffer-read-only: t -*- vi: set ro:
 
2
# DO NOT EDIT! GENERATED AUTOMATICALLY!
1
3
# Makefile for PO directory in any package using GNU gettext.
2
 
# Copyright (C) 1995-1997, 2000-2002 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
 
4
# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
3
5
#
4
6
# This file can be copied and used freely without restrictions.  It can
5
7
# be used in projects which are not available under the GNU General Public
7
9
# functionality.
8
10
# Please note that the actual code of GNU gettext is covered by the GNU
9
11
# General Public License and is *not* in the public domain.
 
12
#
 
13
# Origin: gettext-0.17
 
14
GETTEXT_MACRO_VERSION = 0.17
10
15
 
11
16
PACKAGE = @PACKAGE@
12
17
VERSION = @VERSION@
 
18
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
13
19
 
14
20
SHELL = /bin/sh
15
21
@SET_MAKE@
20
26
 
21
27
prefix = @prefix@
22
28
exec_prefix = @exec_prefix@
 
29
datarootdir = @datarootdir@
23
30
datadir = @datadir@
24
 
localedir = $(datadir)/locale
 
31
localedir = @localedir@
25
32
gettextsrcdir = $(datadir)/gettext/po
26
33
 
27
34
INSTALL = @INSTALL@
28
35
INSTALL_DATA = @INSTALL_DATA@
29
 
MKINSTALLDIRS = @MKINSTALLDIRS@
30
 
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
31
 
 
32
 
GMSGFMT = @GMSGFMT@
33
 
MSGFMT = @MSGFMT@
34
 
XGETTEXT = @XGETTEXT@
 
36
 
 
37
# We use $(mkdir_p).
 
38
# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
 
39
# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
 
40
# @install_sh@ does not start with $(SHELL), so we add it.
 
41
# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
 
42
# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
 
43
# versions, $(mkinstalldirs) and $(install_sh) are unused.
 
44
mkinstalldirs = $(SHELL) @install_sh@ -d
 
45
install_sh = $(SHELL) @install_sh@
 
46
MKDIR_P = @MKDIR_P@
 
47
mkdir_p = @mkdir_p@
 
48
 
 
49
GMSGFMT_ = @GMSGFMT@
 
50
GMSGFMT_no = @GMSGFMT@
 
51
GMSGFMT_yes = @GMSGFMT_015@
 
52
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
 
53
MSGFMT_ = @MSGFMT@
 
54
MSGFMT_no = @MSGFMT@
 
55
MSGFMT_yes = @MSGFMT_015@
 
56
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
 
57
XGETTEXT_ = @XGETTEXT@
 
58
XGETTEXT_no = @XGETTEXT@
 
59
XGETTEXT_yes = @XGETTEXT_015@
 
60
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
35
61
MSGMERGE = msgmerge
36
62
MSGMERGE_UPDATE = @MSGMERGE@ --update
37
63
MSGINIT = msginit
42
68
GMOFILES = @GMOFILES@
43
69
UPDATEPOFILES = @UPDATEPOFILES@
44
70
DUMMYPOFILES = @DUMMYPOFILES@
45
 
DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
 
71
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
46
72
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
47
 
DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
 
73
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
48
74
$(POFILES) $(GMOFILES) \
49
75
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
50
76
 
55
81
# Makevars gets inserted here. (Don't remove this line!)
56
82
 
57
83
.SUFFIXES:
58
 
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
 
84
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
59
85
 
60
86
.po.mo:
61
87
        @echo "$(MSGFMT) -c -o $@ $<"; \
72
98
        mv t-$@ $@
73
99
 
74
100
 
75
 
all: all-@USE_NLS@
 
101
all: check-macro-version all-@USE_NLS@
76
102
 
77
 
all-yes: $(CATALOGS)
 
103
all-yes: stamp-po
78
104
all-no:
79
105
 
 
106
# Ensure that the gettext macros and this Makefile.in.in are in sync.
 
107
check-macro-version:
 
108
        @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \
 
109
          || { 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; \
 
110
               exit 1; \
 
111
             }
 
112
 
 
113
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
 
114
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
 
115
# we don't want to bother translators with empty POT files). We assume that
 
116
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
 
117
# In this case, stamp-po is a nop (i.e. a phony target).
 
118
 
 
119
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
 
120
# been loosely updated. Its purpose is that when a developer or translator
 
121
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
 
122
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
 
123
# invocations of "make" will do nothing. This timestamp would not be necessary
 
124
# if updating the $(CATALOGS) would always touch them; however, the rule for
 
125
# $(POFILES) has been designed to not touch files that don't need to be
 
126
# changed.
 
127
stamp-po: $(srcdir)/$(DOMAIN).pot
 
128
        test ! -f $(srcdir)/$(DOMAIN).pot || \
 
129
          test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
 
130
        @test ! -f $(srcdir)/$(DOMAIN).pot || { \
 
131
          echo "touch stamp-po" && \
 
132
          echo timestamp > stamp-poT && \
 
133
          mv stamp-poT stamp-po; \
 
134
        }
 
135
 
80
136
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
81
137
# otherwise packages like GCC can not be built if only parts of the source
82
138
# have been downloaded.
83
139
 
 
140
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
 
141
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
84
142
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
85
 
        $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
86
 
          --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
87
 
          --files-from=$(srcdir)/POTFILES.in \
88
 
          --copyright-holder='$(COPYRIGHT_HOLDER)'
 
143
        if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \
 
144
          package_gnu='GNU '; \
 
145
        else \
 
146
          package_gnu=''; \
 
147
        fi; \
 
148
        if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
 
149
          msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
 
150
        else \
 
151
          msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
 
152
        fi; \
 
153
        case `$(XGETTEXT) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \
 
154
          '' | 0.[0-9] | 0.[0-9].* | 0.1[0-5] | 0.1[0-5].* | 0.16 | 0.16.[0-1]*) \
 
155
            $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
 
156
              --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
 
157
              --files-from=$(srcdir)/POTFILES.in \
 
158
              --copyright-holder='$(COPYRIGHT_HOLDER)' \
 
159
              --msgid-bugs-address="$$msgid_bugs_address" \
 
160
            ;; \
 
161
          *) \
 
162
            $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
 
163
              --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) @XGETTEXT_EXTRA_OPTIONS@ \
 
164
              --files-from=$(srcdir)/POTFILES.in \
 
165
              --copyright-holder='$(COPYRIGHT_HOLDER)' \
 
166
              --package-name="$${package_gnu}@PACKAGE@" \
 
167
              --package-version='@VERSION@' \
 
168
              --msgid-bugs-address="$$msgid_bugs_address" \
 
169
            ;; \
 
170
        esac
89
171
        test ! -f $(DOMAIN).po || { \
90
172
          if test -f $(srcdir)/$(DOMAIN).pot; then \
91
173
            sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
101
183
          fi; \
102
184
        }
103
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.
104
189
$(srcdir)/$(DOMAIN).pot:
105
190
        $(MAKE) $(DOMAIN).pot-update
106
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.
107
194
$(POFILES): $(srcdir)/$(DOMAIN).pot
108
195
        @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
109
 
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
110
 
        echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
111
 
        cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
 
196
        if test -f "$(srcdir)/$${lang}.po"; then \
 
197
          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
 
198
          echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
 
199
          cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
 
200
        else \
 
201
          $(MAKE) $${lang}.po-create; \
 
202
        fi
112
203
 
113
204
 
114
205
install: install-exec install-data
115
206
install-exec:
116
207
install-data: install-data-@USE_NLS@
117
 
        if test "$(PACKAGE)" = "gettext"; then \
118
 
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
119
 
          for file in $(DISTFILES.common); do \
 
208
        if test "$(PACKAGE)" = "gettext-tools"; then \
 
209
          $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
 
210
          for file in $(DISTFILES.common) Makevars.template; do \
120
211
            $(INSTALL_DATA) $(srcdir)/$$file \
121
212
                            $(DESTDIR)$(gettextsrcdir)/$$file; \
122
213
          done; \
 
214
          for file in Makevars; do \
 
215
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
 
216
          done; \
123
217
        else \
124
218
          : ; \
125
219
        fi
126
220
install-data-no: all
127
221
install-data-yes: all
128
 
        $(mkinstalldirs) $(DESTDIR)$(datadir)
 
222
        $(mkdir_p) $(DESTDIR)$(datadir)
129
223
        @catalogs='$(CATALOGS)'; \
130
224
        for cat in $$catalogs; do \
131
225
          cat=`basename $$cat`; \
132
226
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
133
227
          dir=$(localedir)/$$lang/LC_MESSAGES; \
134
 
          $(mkinstalldirs) $(DESTDIR)$$dir; \
 
228
          $(mkdir_p) $(DESTDIR)$$dir; \
135
229
          if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
136
230
          $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
137
231
          echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
170
264
installdirs: installdirs-exec installdirs-data
171
265
installdirs-exec:
172
266
installdirs-data: installdirs-data-@USE_NLS@
173
 
        if test "$(PACKAGE)" = "gettext"; then \
174
 
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
 
267
        if test "$(PACKAGE)" = "gettext-tools"; then \
 
268
          $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
175
269
        else \
176
270
          : ; \
177
271
        fi
178
272
installdirs-data-no:
179
273
installdirs-data-yes:
180
 
        $(mkinstalldirs) $(DESTDIR)$(datadir)
 
274
        $(mkdir_p) $(DESTDIR)$(datadir)
181
275
        @catalogs='$(CATALOGS)'; \
182
276
        for cat in $$catalogs; do \
183
277
          cat=`basename $$cat`; \
184
278
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
185
279
          dir=$(localedir)/$$lang/LC_MESSAGES; \
186
 
          $(mkinstalldirs) $(DESTDIR)$$dir; \
 
280
          $(mkdir_p) $(DESTDIR)$$dir; \
187
281
          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
188
282
            if test -n "$$lc"; then \
189
283
              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
215
309
uninstall: uninstall-exec uninstall-data
216
310
uninstall-exec:
217
311
uninstall-data: uninstall-data-@USE_NLS@
218
 
        if test "$(PACKAGE)" = "gettext"; then \
219
 
          for file in $(DISTFILES.common); do \
 
312
        if test "$(PACKAGE)" = "gettext-tools"; then \
 
313
          for file in $(DISTFILES.common) Makevars.template; do \
220
314
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
221
315
          done; \
222
316
        else \
235
329
 
236
330
check: all
237
331
 
238
 
dvi info tags TAGS ID:
 
332
info dvi ps pdf html tags TAGS ctags CTAGS ID:
239
333
 
240
334
mostlyclean:
241
335
        rm -f remove-potcdate.sed
 
336
        rm -f stamp-poT
242
337
        rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
243
338
        rm -fr *.o
244
339
 
250
345
maintainer-clean: distclean
251
346
        @echo "This command is intended for maintainers to use;"
252
347
        @echo "it deletes files that may require special tools to rebuild."
253
 
        rm -f $(GMOFILES)
 
348
        rm -f stamp-po $(GMOFILES)
254
349
 
255
350
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
256
351
dist distdir:
257
352
        $(MAKE) update-po
258
353
        @$(MAKE) dist2
259
354
# This is a separate target because 'update-po' must be executed before.
260
 
dist2: $(DISTFILES)
 
355
dist2: stamp-po $(DISTFILES)
261
356
        dists="$(DISTFILES)"; \
262
 
        if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
 
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; \
 
370
        done; \
263
371
        if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
264
372
        for file in $$dists; do \
265
373
          if test -f $$file; then \
266
 
            cp -p $$file $(distdir); \
 
374
            cp -p $$file $(distdir) || exit 1; \
267
375
          else \
268
 
            cp -p $(srcdir)/$$file $(distdir); \
 
376
            cp -p $(srcdir)/$$file $(distdir) || exit 1; \
269
377
          fi; \
270
378
        done
271
379
 
272
380
update-po: Makefile
273
381
        $(MAKE) $(DOMAIN).pot-update
274
 
        $(MAKE) $(UPDATEPOFILES)
 
382
        test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
275
383
        $(MAKE) update-gmo
276
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
 
277
392
# General rule for updating PO files.
278
393
 
279
394
.nop.po-update:
280
395
        @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
281
 
        if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
 
396
        if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
282
397
        tmpdir=`pwd`; \
283
398
        echo "$$lang:"; \
284
399
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
305
420
update-gmo: Makefile $(GMOFILES)
306
421
        @:
307
422
 
308
 
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
 
423
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
309
424
        cd $(top_builddir) \
310
 
          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
311
 
               $(SHELL) ./config.status
 
425
          && $(SHELL) ./config.status $(subdir)/$@.in po-directories
312
426
 
313
427
force:
314
428