~ubuntu-branches/ubuntu/natty/gst-entrans/natty

« back to all changes in this revision

Viewing changes to po/Makefile.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2010-09-13 19:49:29 UTC
  • Revision ID: james.westby@ubuntu.com-20100913194929-qz90a14xyxln9yfz
Tags: upstream-0.10.2
ImportĀ upstreamĀ versionĀ 0.10.2

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-2002 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
PACKAGE = @PACKAGE@
 
12
VERSION = @VERSION@
 
13
 
 
14
# thomas: add GETTEXT_PACKAGE substitution as used in Makevars
 
15
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 
16
 
 
17
SHELL = /bin/sh
 
18
@SET_MAKE@
 
19
 
 
20
srcdir = @srcdir@
 
21
top_srcdir = @top_srcdir@
 
22
VPATH = @srcdir@
 
23
 
 
24
prefix = @prefix@
 
25
exec_prefix = @exec_prefix@
 
26
datadir = @datadir@
 
27
localedir = $(datadir)/locale
 
28
gettextsrcdir = $(datadir)/gettext/po
 
29
 
 
30
INSTALL = @INSTALL@
 
31
INSTALL_DATA = @INSTALL_DATA@
 
32
MKINSTALLDIRS = @MKINSTALLDIRS@
 
33
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
 
34
 
 
35
GMSGFMT = @GMSGFMT@
 
36
MSGFMT = @MSGFMT@
 
37
XGETTEXT = @XGETTEXT@
 
38
MSGMERGE = msgmerge
 
39
MSGMERGE_UPDATE = @MSGMERGE@ --update
 
40
MSGINIT = msginit
 
41
MSGCONV = msgconv
 
42
MSGFILTER = msgfilter
 
43
 
 
44
POFILES = @POFILES@
 
45
GMOFILES = @GMOFILES@
 
46
UPDATEPOFILES = @UPDATEPOFILES@
 
47
DUMMYPOFILES = @DUMMYPOFILES@
 
48
DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
 
49
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
 
50
DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
 
51
$(POFILES) $(GMOFILES) \
 
52
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
 
53
 
 
54
POTFILES = \
 
55
 
 
56
CATALOGS = @CATALOGS@
 
57
 
 
58
# Makevars gets inserted here. (Don't remove this line!)
 
59
 
 
60
.SUFFIXES:
 
61
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
 
62
 
 
63
.po.mo:
 
64
        @echo "$(MSGFMT) -c -o $@ $<"; \
 
65
        $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
 
66
 
 
67
.po.gmo:
 
68
        @lang=`echo $* | sed -e 's,.*/,,'`; \
 
69
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
 
70
        echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
 
71
        cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
 
72
 
 
73
.sin.sed:
 
74
        sed -e '/^#/d' $< > t-$@
 
75
        mv t-$@ $@
 
76
 
 
77
 
 
78
all: all-@USE_NLS@
 
79
 
 
80
all-yes: $(CATALOGS)
 
81
all-no:
 
82
 
 
83
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
 
84
# otherwise packages like GCC can not be built if only parts of the source
 
85
# have been downloaded.
 
86
 
 
87
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
 
88
        $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
 
89
          --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
 
90
          --files-from=$(srcdir)/POTFILES.in \
 
91
          --copyright-holder='$(COPYRIGHT_HOLDER)'
 
92
        test ! -f $(DOMAIN).po || { \
 
93
          if test -f $(srcdir)/$(DOMAIN).pot; then \
 
94
            sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
 
95
            sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
 
96
            if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
 
97
              rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
 
98
            else \
 
99
              rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
 
100
              mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
 
101
            fi; \
 
102
          else \
 
103
            mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
 
104
          fi; \
 
105
        }
 
106
 
 
107
$(srcdir)/$(DOMAIN).pot:
 
108
        $(MAKE) $(DOMAIN).pot-update
 
109
 
 
110
$(POFILES): $(srcdir)/$(DOMAIN).pot
 
111
        @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
 
112
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
 
113
        echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
 
114
        cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
 
115
 
 
116
 
 
117
install: install-exec install-data
 
118
install-exec:
 
119
install-data: install-data-@USE_NLS@
 
120
        if test "$(PACKAGE)" = "gettext"; then \
 
121
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
 
122
          for file in $(DISTFILES.common); do \
 
123
            $(INSTALL_DATA) $(srcdir)/$$file \
 
124
                            $(DESTDIR)$(gettextsrcdir)/$$file; \
 
125
          done; \
 
126
        else \
 
127
          : ; \
 
128
        fi
 
129
install-data-no: all
 
130
install-data-yes: all
 
131
        $(mkinstalldirs) $(DESTDIR)$(datadir)
 
132
        @catalogs='$(CATALOGS)'; \
 
133
        for cat in $$catalogs; do \
 
134
          cat=`basename $$cat`; \
 
135
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
 
136
          dir=$(localedir)/$$lang/LC_MESSAGES; \
 
137
          $(mkinstalldirs) $(DESTDIR)$$dir; \
 
138
          if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
 
139
          $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
 
140
          echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
 
141
          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
 
142
            if test -n "$$lc"; then \
 
143
              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
 
144
                link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
 
145
                mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
 
146
                mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
147
                (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
 
148
                 for file in *; do \
 
149
                   if test -f $$file; then \
 
150
                     ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
 
151
                   fi; \
 
152
                 done); \
 
153
                rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
 
154
              else \
 
155
                if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
 
156
                  :; \
 
157
                else \
 
158
                  rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
159
                  mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
160
                fi; \
 
161
              fi; \
 
162
              rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
 
163
              ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
 
164
              ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
 
165
              cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
 
166
              echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
 
167
            fi; \
 
168
          done; \
 
169
        done
 
170
 
 
171
install-strip: install
 
172
 
 
173
installdirs: installdirs-exec installdirs-data
 
174
installdirs-exec:
 
175
installdirs-data: installdirs-data-@USE_NLS@
 
176
        if test "$(PACKAGE)" = "gettext"; then \
 
177
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
 
178
        else \
 
179
          : ; \
 
180
        fi
 
181
installdirs-data-no:
 
182
installdirs-data-yes:
 
183
        $(mkinstalldirs) $(DESTDIR)$(datadir)
 
184
        @catalogs='$(CATALOGS)'; \
 
185
        for cat in $$catalogs; do \
 
186
          cat=`basename $$cat`; \
 
187
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
 
188
          dir=$(localedir)/$$lang/LC_MESSAGES; \
 
189
          $(mkinstalldirs) $(DESTDIR)$$dir; \
 
190
          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
 
191
            if test -n "$$lc"; then \
 
192
              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
 
193
                link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
 
194
                mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
 
195
                mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
196
                (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
 
197
                 for file in *; do \
 
198
                   if test -f $$file; then \
 
199
                     ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
 
200
                   fi; \
 
201
                 done); \
 
202
                rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
 
203
              else \
 
204
                if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
 
205
                  :; \
 
206
                else \
 
207
                  rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
208
                  mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
209
                fi; \
 
210
              fi; \
 
211
            fi; \
 
212
          done; \
 
213
        done
 
214
 
 
215
# Define this as empty until I found a useful application.
 
216
installcheck:
 
217
 
 
218
uninstall: uninstall-exec uninstall-data
 
219
uninstall-exec:
 
220
uninstall-data: uninstall-data-@USE_NLS@
 
221
        if test "$(PACKAGE)" = "gettext"; then \
 
222
          for file in $(DISTFILES.common); do \
 
223
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
 
224
          done; \
 
225
        else \
 
226
          : ; \
 
227
        fi
 
228
uninstall-data-no:
 
229
uninstall-data-yes:
 
230
        catalogs='$(CATALOGS)'; \
 
231
        for cat in $$catalogs; do \
 
232
          cat=`basename $$cat`; \
 
233
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
 
234
          for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
 
235
            rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
 
236
          done; \
 
237
        done
 
238
 
 
239
check: all
 
240
 
 
241
dvi info tags TAGS ID:
 
242
 
 
243
mostlyclean:
 
244
        rm -f remove-potcdate.sed
 
245
        rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
246
        rm -fr *.o
 
247
 
 
248
clean: mostlyclean
 
249
 
 
250
distclean: clean
 
251
        rm -f Makefile Makefile.in POTFILES *.mo
 
252
 
 
253
maintainer-clean: distclean
 
254
        @echo "This command is intended for maintainers to use;"
 
255
        @echo "it deletes files that may require special tools to rebuild."
 
256
        rm -f $(GMOFILES)
 
257
 
 
258
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 
259
dist distdir:
 
260
        $(MAKE) update-po
 
261
        @$(MAKE) dist2
 
262
# This is a separate target because 'update-po' must be executed before.
 
263
dist2: $(DISTFILES)
 
264
        dists="$(DISTFILES)"; \
 
265
        if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
 
266
        if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
 
267
        for file in $$dists; do \
 
268
          if test -f $$file; then \
 
269
            cp -p $$file $(distdir); \
 
270
          else \
 
271
            cp -p $(srcdir)/$$file $(distdir); \
 
272
          fi; \
 
273
        done
 
274
 
 
275
update-po: Makefile
 
276
        $(MAKE) $(DOMAIN).pot-update
 
277
        $(MAKE) $(UPDATEPOFILES)
 
278
        $(MAKE) update-gmo
 
279
 
 
280
# General rule for updating PO files.
 
281
 
 
282
.nop.po-update:
 
283
        @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
 
284
        if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
 
285
        tmpdir=`pwd`; \
 
286
        echo "$$lang:"; \
 
287
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
 
288
        echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
 
289
        cd $(srcdir); \
 
290
        if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
 
291
          if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 
292
            rm -f $$tmpdir/$$lang.new.po; \
 
293
          else \
 
294
            if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
 
295
              :; \
 
296
            else \
 
297
              echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
 
298
              exit 1; \
 
299
            fi; \
 
300
          fi; \
 
301
        else \
 
302
          echo "msgmerge for $$lang.po failed!" 1>&2; \
 
303
          rm -f $$tmpdir/$$lang.new.po; \
 
304
        fi
 
305
 
 
306
$(DUMMYPOFILES):
 
307
 
 
308
update-gmo: Makefile $(GMOFILES)
 
309
        @:
 
310
 
 
311
# thomas: add LINGUAS as a dependency so that the Makefile gets rebuilt
 
312
# properly when we add languages
 
313
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in LINGUAS
 
314
        cd $(top_builddir) \
 
315
          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
 
316
               $(SHELL) ./config.status
 
317
 
 
318
force:
 
319
 
 
320
# Tell versions [3.59,3.63) of GNU make not to export all variables.
 
321
# Otherwise a system limit (for SysV at least) may be exceeded.
 
322
.NOEXPORT: