~noskcaj/ubuntu/trusty/libextractor/merge

« back to all changes in this revision

Viewing changes to po/Makefile.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-11-08 02:05:01 UTC
  • mfrom: (1.10.2 upstream) (5.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20081108020501-ky32z9x7hk26po32
Tags: 0.5.20c-1ubuntu1
* Merge from Debian unstable, remaining Ubuntu changes:
  - (Build-)depend on libltdl7-dev (Ubuntu-specific change).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Makefile for PO directory in any package using GNU gettext.
2
 
# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
 
2
# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
3
3
#
4
4
# This file can be copied and used freely without restrictions.  It can
5
5
# be used in projects which are not available under the GNU General Public
8
8
# Please note that the actual code of GNU gettext is covered by the GNU
9
9
# General Public License and is *not* in the public domain.
10
10
#
11
 
# Origin: gettext-0.13
 
11
# Origin: gettext-0.16
12
12
 
13
13
PACKAGE = @PACKAGE@
14
14
VERSION = @VERSION@
 
15
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
15
16
 
16
17
SHELL = /bin/sh
17
18
@SET_MAKE@
22
23
 
23
24
prefix = @prefix@
24
25
exec_prefix = @exec_prefix@
 
26
datarootdir = @datarootdir@
25
27
datadir = @datadir@
26
 
localedir = $(datadir)/locale
 
28
localedir = @localedir@
27
29
gettextsrcdir = $(datadir)/gettext/po
28
30
 
29
31
INSTALL = @INSTALL@
30
32
INSTALL_DATA = @INSTALL_DATA@
31
 
MKINSTALLDIRS = @MKINSTALLDIRS@
32
 
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
33
 
 
34
 
GMSGFMT = @GMSGFMT@
35
 
MSGFMT = @MSGFMT@
36
 
XGETTEXT = @XGETTEXT@
 
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
# @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.
 
41
mkinstalldirs = $(SHELL) @install_sh@ -d
 
42
install_sh = $(SHELL) @install_sh@
 
43
MKDIR_P = @MKDIR_P@
 
44
mkdir_p = @mkdir_p@
 
45
 
 
46
GMSGFMT_ = @GMSGFMT@
 
47
GMSGFMT_no = @GMSGFMT@
 
48
GMSGFMT_yes = @GMSGFMT_015@
 
49
GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
 
50
MSGFMT_ = @MSGFMT@
 
51
MSGFMT_no = @MSGFMT@
 
52
MSGFMT_yes = @MSGFMT_015@
 
53
MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
 
54
XGETTEXT_ = @XGETTEXT@
 
55
XGETTEXT_no = @XGETTEXT@
 
56
XGETTEXT_yes = @XGETTEXT_015@
 
57
XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
37
58
MSGMERGE = msgmerge
38
59
MSGMERGE_UPDATE = @MSGMERGE@ --update
39
60
MSGINIT = msginit
46
67
DUMMYPOFILES = @DUMMYPOFILES@
47
68
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
48
69
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
49
 
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
 
70
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
50
71
$(POFILES) $(GMOFILES) \
51
72
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
52
73
 
57
78
# Makevars gets inserted here. (Don't remove this line!)
58
79
 
59
80
.SUFFIXES:
60
 
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
 
81
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
61
82
 
62
83
.po.mo:
63
84
        @echo "$(MSGFMT) -c -o $@ $<"; \
79
100
all-yes: stamp-po
80
101
all-no:
81
102
 
 
103
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
 
104
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
 
105
# we don't want to bother translators with empty POT files). We assume that
 
106
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
 
107
# In this case, stamp-po is a nop (i.e. a phony target).
 
108
 
82
109
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
83
110
# been loosely updated. Its purpose is that when a developer or translator
84
111
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
88
115
# $(POFILES) has been designed to not touch files that don't need to be
89
116
# changed.
90
117
stamp-po: $(srcdir)/$(DOMAIN).pot
91
 
        test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
92
 
        @echo "touch stamp-po"
93
 
        @echo timestamp > stamp-poT
94
 
        @mv stamp-poT stamp-po
 
118
        test ! -f $(srcdir)/$(DOMAIN).pot || \
 
119
          test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
 
120
        @test ! -f $(srcdir)/$(DOMAIN).pot || { \
 
121
          echo "touch stamp-po" && \
 
122
          echo timestamp > stamp-poT && \
 
123
          mv stamp-poT stamp-po; \
 
124
        }
95
125
 
96
126
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
97
127
# otherwise packages like GCC can not be built if only parts of the source
100
130
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
101
131
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
102
132
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
 
133
        if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
 
134
          msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
 
135
        else \
 
136
          msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
 
137
        fi; \
103
138
        $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
104
139
          --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
105
140
          --files-from=$(srcdir)/POTFILES.in \
106
141
          --copyright-holder='$(COPYRIGHT_HOLDER)' \
107
 
          --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
 
142
          --msgid-bugs-address="$$msgid_bugs_address"
108
143
        test ! -f $(DOMAIN).po || { \
109
144
          if test -f $(srcdir)/$(DOMAIN).pot; then \
110
145
            sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
130
165
# Note that a PO file is not touched if it doesn't need to be changed.
131
166
$(POFILES): $(srcdir)/$(DOMAIN).pot
132
167
        @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
133
 
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
134
 
        echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
135
 
        cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
 
168
        if test -f "$(srcdir)/$${lang}.po"; then \
 
169
          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
 
170
          echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
 
171
          cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
 
172
        else \
 
173
          $(MAKE) $${lang}.po-create; \
 
174
        fi
136
175
 
137
176
 
138
177
install: install-exec install-data
139
178
install-exec:
140
179
install-data: install-data-@USE_NLS@
141
180
        if test "$(PACKAGE)" = "gettext-tools"; then \
142
 
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
 
181
          $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
143
182
          for file in $(DISTFILES.common) Makevars.template; do \
144
183
            $(INSTALL_DATA) $(srcdir)/$$file \
145
184
                            $(DESTDIR)$(gettextsrcdir)/$$file; \
152
191
        fi
153
192
install-data-no: all
154
193
install-data-yes: all
155
 
        $(mkinstalldirs) $(DESTDIR)$(datadir)
 
194
        $(mkdir_p) $(DESTDIR)$(datadir)
156
195
        @catalogs='$(CATALOGS)'; \
157
196
        for cat in $$catalogs; do \
158
197
          cat=`basename $$cat`; \
159
198
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
160
199
          dir=$(localedir)/$$lang/LC_MESSAGES; \
161
 
          $(mkinstalldirs) $(DESTDIR)$$dir; \
 
200
          $(mkdir_p) $(DESTDIR)$$dir; \
162
201
          if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
163
202
          $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
164
203
          echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
198
237
installdirs-exec:
199
238
installdirs-data: installdirs-data-@USE_NLS@
200
239
        if test "$(PACKAGE)" = "gettext-tools"; then \
201
 
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
 
240
          $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
202
241
        else \
203
242
          : ; \
204
243
        fi
205
244
installdirs-data-no:
206
245
installdirs-data-yes:
207
 
        $(mkinstalldirs) $(DESTDIR)$(datadir)
 
246
        $(mkdir_p) $(DESTDIR)$(datadir)
208
247
        @catalogs='$(CATALOGS)'; \
209
248
        for cat in $$catalogs; do \
210
249
          cat=`basename $$cat`; \
211
250
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
212
251
          dir=$(localedir)/$$lang/LC_MESSAGES; \
213
 
          $(mkinstalldirs) $(DESTDIR)$$dir; \
 
252
          $(mkdir_p) $(DESTDIR)$$dir; \
214
253
          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
215
254
            if test -n "$$lc"; then \
216
255
              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
285
324
        $(MAKE) update-po
286
325
        @$(MAKE) dist2
287
326
# This is a separate target because 'update-po' must be executed before.
288
 
dist2: $(DISTFILES)
 
327
dist2: stamp-po $(DISTFILES)
289
328
        dists="$(DISTFILES)"; \
290
329
        if test "$(PACKAGE)" = "gettext-tools"; then \
291
330
          dists="$$dists Makevars.template"; \
292
331
        fi; \
 
332
        if test -f $(srcdir)/$(DOMAIN).pot; then \
 
333
          dists="$$dists $(DOMAIN).pot stamp-po"; \
 
334
        fi; \
293
335
        if test -f $(srcdir)/ChangeLog; then \
294
336
          dists="$$dists ChangeLog"; \
295
337
        fi; \
301
343
        if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
302
344
        for file in $$dists; do \
303
345
          if test -f $$file; then \
304
 
            cp -p $$file $(distdir); \
 
346
            cp -p $$file $(distdir) || exit 1; \
305
347
          else \
306
 
            cp -p $(srcdir)/$$file $(distdir); \
 
348
            cp -p $(srcdir)/$$file $(distdir) || exit 1; \
307
349
          fi; \
308
350
        done
309
351
 
312
354
        test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
313
355
        $(MAKE) update-gmo
314
356
 
 
357
# General rule for creating PO files.
 
358
 
 
359
.nop.po-create:
 
360
        @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
 
361
        echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
 
362
        exit 1
 
363
 
315
364
# General rule for updating PO files.
316
365
 
317
366
.nop.po-update:
343
392
update-gmo: Makefile $(GMOFILES)
344
393
        @:
345
394
 
346
 
Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
 
395
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
347
396
        cd $(top_builddir) \
348
 
          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
349
 
               $(SHELL) ./config.status
 
397
          && $(SHELL) ./config.status $(subdir)/$@.in po-directories
350
398
 
351
399
force:
352
400