~ubuntu-branches/ubuntu/edgy/e2fsprogs/edgy-security

« back to all changes in this revision

Viewing changes to po/Makefile.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Tollef Fog Heen
  • Date: 2005-08-23 10:42:10 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050823104210-t15igvmgrkzea0dq
Tags: 1.38-2ubuntu1
* Merge with Debian.  (Ubuntu #13757)
* Remove tests/f_bad_disconnected_inode/image.gz to be able to build the
  package.  This will (hopefully) be in the next upstream version and is
  just used for testing.

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-2002 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
 
2
# Copyright (C) 1995-1997, 2000-2004 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
7
7
# functionality.
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
#
 
11
# Origin: gettext-0.14
10
12
 
11
13
PACKAGE = @PACKAGE@
12
14
VERSION = @VERSION@
27
29
INSTALL = @INSTALL@
28
30
INSTALL_DATA = @INSTALL_DATA@
29
31
MKINSTALLDIRS = @MKINSTALLDIRS@
30
 
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
 
32
mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
31
33
 
32
34
GMSGFMT = @GMSGFMT@
33
35
MSGFMT = @MSGFMT@
42
44
GMOFILES = @GMOFILES@
43
45
UPDATEPOFILES = @UPDATEPOFILES@
44
46
DUMMYPOFILES = @DUMMYPOFILES@
45
 
DISTFILES.common = Makefile.in.in Makevars remove-potcdate.sin \
 
47
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
46
48
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
47
 
DISTFILES = $(DISTFILES.common) POTFILES.in $(DOMAIN).pot \
 
49
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
48
50
$(POFILES) $(GMOFILES) \
49
51
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
50
52
 
55
57
# Makevars gets inserted here. (Don't remove this line!)
56
58
 
57
59
.SUFFIXES:
58
 
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
 
60
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
59
61
 
60
62
.po.mo:
61
63
        @echo "$(MSGFMT) -c -o $@ $<"; \
65
67
        @lang=`echo $* | sed -e 's,.*/,,'`; \
66
68
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
67
69
        echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
68
 
        $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $(srcdir)/$${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
 
70
        cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
69
71
 
70
72
.sin.sed:
71
73
        sed -e '/^#/d' $< > t-$@
74
76
 
75
77
all: all-@USE_NLS@
76
78
 
77
 
all-yes: $(CATALOGS)
 
79
all-yes: @MAINTAINER_CMT@stamp-po
78
80
all-no:
79
81
 
 
82
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
 
83
# been loosely updated. Its purpose is that when a developer or translator
 
84
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
 
85
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
 
86
# invocations of "make" will do nothing. This timestamp would not be necessary
 
87
# if updating the $(CATALOGS) would always touch them; however, the rule for
 
88
# $(POFILES) has been designed to not touch files that don't need to be
 
89
# changed.
 
90
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
 
95
 
80
96
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
81
97
# otherwise packages like GCC can not be built if only parts of the source
82
98
# have been downloaded.
83
99
 
84
 
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
 
100
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
 
101
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
 
102
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed \
 
103
        $(srcdir)/at-expand.pl
85
104
        $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
86
105
          --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
87
 
          --keyword=_ --keyword=N_ --keyword=P_:1,2 \
88
106
          --files-from=$(srcdir)/POTFILES.in \
89
 
          --copyright-holder='$(COPYRIGHT_HOLDER)'
 
107
          --copyright-holder='$(COPYRIGHT_HOLDER)' \
 
108
          --msgid-bugs-address='$(MSGID_BUGS_ADDRESS)'
 
109
        perl $(srcdir)/at-expand.pl < $(DOMAIN).po > $(DOMAIN).po.new
 
110
        mv $(DOMAIN).po $(DOMAIN).po.bak
 
111
        mv $(DOMAIN).po.new $(DOMAIN).po
90
112
        test ! -f $(DOMAIN).po || { \
91
113
          if test -f $(srcdir)/$(DOMAIN).pot; then \
92
114
            sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
102
124
          fi; \
103
125
        }
104
126
 
 
127
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
 
128
# every "make" invocation, only create it when it is missing.
 
129
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
105
130
$(srcdir)/$(DOMAIN).pot:
106
131
        $(MAKE) $(DOMAIN).pot-update
107
132
 
 
133
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
 
134
# Note that a PO file is not touched if it doesn't need to be changed.
108
135
$(POFILES): $(srcdir)/$(DOMAIN).pot
109
136
        @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
110
 
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
111
 
        echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
112
 
        cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
 
137
        if test -f "$(srcdir)/$${lang}.po"; then \
 
138
          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
 
139
          echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
 
140
          cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
 
141
        else \
 
142
          $(MAKE) $${lang}.po-create; \
 
143
        fi
113
144
 
114
145
 
115
146
install: install-exec install-data
116
147
install-exec:
117
148
install-data: install-data-@USE_NLS@
118
 
        if test "$(PACKAGE)" = "gettext"; then \
 
149
        if test "$(PACKAGE)" = "gettext-tools"; then \
119
150
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
120
 
          for file in $(DISTFILES.common); do \
 
151
          for file in $(DISTFILES.common) Makevars.template; do \
121
152
            $(INSTALL_DATA) $(srcdir)/$$file \
122
153
                            $(DESTDIR)$(gettextsrcdir)/$$file; \
123
154
          done; \
 
155
          for file in Makevars; do \
 
156
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
 
157
          done; \
124
158
        else \
125
159
          : ; \
126
160
        fi
171
205
installdirs: installdirs-exec installdirs-data
172
206
installdirs-exec:
173
207
installdirs-data: installdirs-data-@USE_NLS@
174
 
        if test "$(PACKAGE)" = "gettext"; then \
 
208
        if test "$(PACKAGE)" = "gettext-tools"; then \
175
209
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
176
210
        else \
177
211
          : ; \
216
250
uninstall: uninstall-exec uninstall-data
217
251
uninstall-exec:
218
252
uninstall-data: uninstall-data-@USE_NLS@
219
 
        if test "$(PACKAGE)" = "gettext"; then \
220
 
          for file in $(DISTFILES.common); do \
 
253
        if test "$(PACKAGE)" = "gettext-tools"; then \
 
254
          for file in $(DISTFILES.common) Makevars.template; do \
221
255
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
222
256
          done; \
223
257
        else \
236
270
 
237
271
check: all
238
272
 
239
 
dvi info tags TAGS ID:
 
273
info dvi ps pdf html tags TAGS ctags CTAGS ID:
240
274
 
241
275
mostlyclean:
242
 
        rm -f remove-potcdate.sed *.gmo
 
276
        rm -f remove-potcdate.sed 
 
277
        rm -f stamp-poT
243
278
        rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
 
279
        rm -f $(DOMAIN).po.bak
244
280
        rm -fr *.o
245
281
 
246
282
clean: mostlyclean
251
287
maintainer-clean: distclean
252
288
        @echo "This command is intended for maintainers to use;"
253
289
        @echo "it deletes files that may require special tools to rebuild."
254
 
        rm -f $(GMOFILES)
 
290
        rm -f stamp-po $(GMOFILES)
255
291
 
256
292
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
257
293
dist distdir:
260
296
# This is a separate target because 'update-po' must be executed before.
261
297
dist2: $(DISTFILES)
262
298
        dists="$(DISTFILES)"; \
263
 
        if test -f $(srcdir)/ChangeLog; then dists="$$dists ChangeLog"; fi; \
 
299
        if test "$(PACKAGE)" = "gettext-tools"; then \
 
300
          dists="$$dists Makevars.template"; \
 
301
        fi; \
 
302
        if test -f $(srcdir)/ChangeLog; then \
 
303
          dists="$$dists ChangeLog"; \
 
304
        fi; \
 
305
        for i in 0 1 2 3 4 5 6 7 8 9; do \
 
306
          if test -f $(srcdir)/ChangeLog.$$i; then \
 
307
            dists="$$dists ChangeLog.$$i"; \
 
308
          fi; \
 
309
        done; \
264
310
        if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
265
311
        for file in $$dists; do \
266
312
          if test -f $$file; then \
272
318
 
273
319
update-po: Makefile
274
320
        $(MAKE) $(DOMAIN).pot-update
275
 
        $(MAKE) $(UPDATEPOFILES)
 
321
        test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
276
322
        $(MAKE) update-gmo
277
323
 
 
324
# General rule for creating PO files.
 
325
 
 
326
.nop.po-create:
 
327
        @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
 
328
        echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
 
329
        exit 1
 
330
 
278
331
# General rule for updating PO files.
279
332
 
280
333
.nop.po-update:
281
334
        @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
282
 
        if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
 
335
        if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
283
336
        tmpdir=`pwd`; \
284
337
        echo "$$lang:"; \
285
338
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
306
359
update-gmo: Makefile $(GMOFILES)
307
360
        @:
308
361
 
309
 
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
 
362
Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@
310
363
        cd $(top_builddir) \
311
364
          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
312
365
               $(SHELL) ./config.status