~ubuntu-branches/ubuntu/vivid/linphone/vivid

« back to all changes in this revision

Viewing changes to po/Makefile.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2006-11-15 10:34:50 UTC
  • mfrom: (1.2.1 upstream) (2.1.8 feisty)
  • Revision ID: james.westby@ubuntu.com-20061115103450-qgafwcks2lkhctlj
* New upstream release.
* Enable video support.
* Fix mismatched #endif in mscommon.h, closes: #398307.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
 
#
4
 
# This file file be copied and used freely without restrictions.  It can
5
 
# be used in projects which are not available under the GNU Public License
6
 
# but which still want to provide support for the GNU gettext functionality.
7
 
# Please note that the actual code is *not* freely available.
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
 
1
# Makefile for PO directory in any package using GNU gettext.
 
2
# Copyright (C) 1995-1997, 2000-2005 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.14.4
14
12
 
15
 
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
16
13
PACKAGE = @PACKAGE@
17
14
VERSION = @VERSION@
 
15
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
18
16
 
19
17
SHELL = /bin/sh
20
18
@SET_MAKE@
21
19
 
22
20
srcdir = @srcdir@
23
21
top_srcdir = @top_srcdir@
24
 
top_builddir = ..
25
22
VPATH = @srcdir@
26
23
 
27
24
prefix = @prefix@
28
25
exec_prefix = @exec_prefix@
29
 
datadir = $(prefix)/@DATADIRNAME@
 
26
datadir = @datadir@
30
27
localedir = $(datadir)/locale
31
 
gnulocaledir = $(prefix)/share/locale
32
 
gettextsrcdir = $(prefix)/share/glib-2.0/gettext/po
33
 
subdir = po
 
28
gettextsrcdir = $(datadir)/gettext/po
34
29
 
 
30
install_sh = @install_sh@
35
31
INSTALL = @INSTALL@
36
32
INSTALL_DATA = @INSTALL_DATA@
37
 
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
 
33
mkinstalldirs = $(install_sh) -d
38
34
 
39
 
CC = @CC@
40
 
GENCAT = @GENCAT@
41
 
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
 
35
GMSGFMT = @GMSGFMT@
42
36
MSGFMT = @MSGFMT@
43
 
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
44
 
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
45
 
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
46
 
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
47
 
GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
48
 
 
49
 
DEFS = @DEFS@
50
 
CFLAGS = @CFLAGS@
51
 
CPPFLAGS = @CPPFLAGS@
52
 
 
53
 
INCLUDES = -I.. -I$(top_srcdir)/intl
54
 
 
55
 
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
56
 
 
57
 
SOURCES =
 
37
XGETTEXT = @XGETTEXT@
 
38
MSGMERGE = msgmerge
 
39
MSGMERGE_UPDATE = @MSGMERGE@ --update
 
40
MSGINIT = msginit
 
41
MSGCONV = msgconv
 
42
MSGFILTER = msgfilter
 
43
 
58
44
POFILES = @POFILES@
59
45
GMOFILES = @GMOFILES@
60
 
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
61
 
$(POFILES) $(GMOFILES) $(SOURCES)
 
46
UPDATEPOFILES = @UPDATEPOFILES@
 
47
DUMMYPOFILES = @DUMMYPOFILES@
 
48
DISTFILES.common = Makefile.in.in remove-potcdate.sin \
 
49
$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
 
50
DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
 
51
$(POFILES) $(GMOFILES) \
 
52
$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
62
53
 
63
54
POTFILES = \
64
55
 
65
56
CATALOGS = @CATALOGS@
66
 
CATOBJEXT = @CATOBJEXT@
67
 
INSTOBJEXT = @INSTOBJEXT@
 
57
 
 
58
# Makevars gets inserted here. (Don't remove this line!)
68
59
 
69
60
.SUFFIXES:
70
 
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
71
 
 
72
 
.c.o:
73
 
        $(COMPILE) $<
74
 
 
75
 
.po.pox:
76
 
        $(MAKE) $(GETTEXT_PACKAGE).pot
77
 
        $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
 
61
.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
78
62
 
79
63
.po.mo:
80
 
        $(MSGFMT) -o $@ $<
 
64
        @echo "$(MSGFMT) -c -o $@ $<"; \
 
65
        $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
81
66
 
82
67
.po.gmo:
83
 
        file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
84
 
          && rm -f $$file && $(GMSGFMT) -o $$file $<
 
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
85
72
 
86
 
.po.cat:
87
 
        sed -f ../intl/po2msg.sed < $< > $*.msg \
88
 
          && rm -f $@ && $(GENCAT) $@ $*.msg
 
73
.sin.sed:
 
74
        sed -e '/^#/d' $< > t-$@
 
75
        mv t-$@ $@
89
76
 
90
77
 
91
78
all: all-@USE_NLS@
92
79
 
93
 
all-yes: $(CATALOGS)
 
80
all-yes: stamp-po
94
81
all-no:
95
82
 
96
 
$(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
97
 
        $(GENPOT)
 
83
# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
 
84
# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
 
85
# we don't want to bother translators with empty POT files). We assume that
 
86
# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
 
87
# In this case, stamp-po is a nop (i.e. a phony target).
 
88
 
 
89
# stamp-po is a timestamp denoting the last time at which the CATALOGS have
 
90
# been loosely updated. Its purpose is that when a developer or translator
 
91
# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
 
92
# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
 
93
# invocations of "make" will do nothing. This timestamp would not be necessary
 
94
# if updating the $(CATALOGS) would always touch them; however, the rule for
 
95
# $(POFILES) has been designed to not touch files that don't need to be
 
96
# changed.
 
97
stamp-po: $(srcdir)/$(DOMAIN).pot
 
98
        test ! -f $(srcdir)/$(DOMAIN).pot || \
 
99
          test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
 
100
        @test ! -f $(srcdir)/$(DOMAIN).pot || { \
 
101
          echo "touch stamp-po" && \
 
102
          echo timestamp > stamp-poT && \
 
103
          mv stamp-poT stamp-po; \
 
104
        }
 
105
 
 
106
# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
 
107
# otherwise packages like GCC can not be built if only parts of the source
 
108
# have been downloaded.
 
109
 
 
110
# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
 
111
# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
 
112
$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
 
113
        if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
 
114
          msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
 
115
        else \
 
116
          msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
 
117
        fi; \
 
118
        $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
 
119
          --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
 
120
          --files-from=$(srcdir)/POTFILES.in \
 
121
          --copyright-holder='$(COPYRIGHT_HOLDER)' \
 
122
          --msgid-bugs-address="$$msgid_bugs_address"
 
123
        test ! -f $(DOMAIN).po || { \
 
124
          if test -f $(srcdir)/$(DOMAIN).pot; then \
 
125
            sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
 
126
            sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
 
127
            if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
 
128
              rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
 
129
            else \
 
130
              rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
 
131
              mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
 
132
            fi; \
 
133
          else \
 
134
            mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
 
135
          fi; \
 
136
        }
 
137
 
 
138
# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
 
139
# every "make" invocation, only create it when it is missing.
 
140
# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
 
141
$(srcdir)/$(DOMAIN).pot:
 
142
        $(MAKE) $(DOMAIN).pot-update
 
143
 
 
144
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
 
145
# Note that a PO file is not touched if it doesn't need to be changed.
 
146
$(POFILES): $(srcdir)/$(DOMAIN).pot
 
147
        @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
 
148
        if test -f "$(srcdir)/$${lang}.po"; then \
 
149
          test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
 
150
          echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
 
151
          cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
 
152
        else \
 
153
          $(MAKE) $${lang}.po-create; \
 
154
        fi
 
155
 
98
156
 
99
157
install: install-exec install-data
100
158
install-exec:
101
159
install-data: install-data-@USE_NLS@
 
160
        if test "$(PACKAGE)" = "gettext-tools"; then \
 
161
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
 
162
          for file in $(DISTFILES.common) Makevars.template; do \
 
163
            $(INSTALL_DATA) $(srcdir)/$$file \
 
164
                            $(DESTDIR)$(gettextsrcdir)/$$file; \
 
165
          done; \
 
166
          for file in Makevars; do \
 
167
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
 
168
          done; \
 
169
        else \
 
170
          : ; \
 
171
        fi
102
172
install-data-no: all
103
173
install-data-yes: all
104
 
        if test -r "$(MKINSTALLDIRS)"; then \
105
 
          $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
106
 
        else \
107
 
          $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
108
 
        fi
 
174
        $(mkinstalldirs) $(DESTDIR)$(datadir)
109
175
        @catalogs='$(CATALOGS)'; \
110
176
        for cat in $$catalogs; do \
111
177
          cat=`basename $$cat`; \
112
 
          case "$$cat" in \
113
 
            *.gmo) destdir=$(gnulocaledir);; \
114
 
            *)     destdir=$(localedir);; \
115
 
          esac; \
116
 
          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
117
 
          dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
118
 
          if test -r "$(MKINSTALLDIRS)"; then \
119
 
            $(MKINSTALLDIRS) $$dir; \
120
 
          else \
121
 
            $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
122
 
          fi; \
123
 
          if test -r $$cat; then \
124
 
            $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
125
 
            echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
126
 
          else \
127
 
            $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
128
 
            echo "installing $(srcdir)/$$cat as" \
129
 
                 "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
130
 
          fi; \
131
 
          if test -r $$cat.m; then \
132
 
            $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
133
 
            echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
134
 
          else \
135
 
            if test -r $(srcdir)/$$cat.m ; then \
136
 
              $(INSTALL_DATA) $(srcdir)/$$cat.m \
137
 
                $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
138
 
              echo "installing $(srcdir)/$$cat as" \
139
 
                   "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
140
 
            else \
141
 
              true; \
 
178
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
 
179
          dir=$(localedir)/$$lang/LC_MESSAGES; \
 
180
          $(mkinstalldirs) $(DESTDIR)$$dir; \
 
181
          if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
 
182
          $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
 
183
          echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
 
184
          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
 
185
            if test -n "$$lc"; then \
 
186
              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
 
187
                link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
 
188
                mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
 
189
                mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
190
                (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
 
191
                 for file in *; do \
 
192
                   if test -f $$file; then \
 
193
                     ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
 
194
                   fi; \
 
195
                 done); \
 
196
                rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
 
197
              else \
 
198
                if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
 
199
                  :; \
 
200
                else \
 
201
                  rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
202
                  mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
203
                fi; \
 
204
              fi; \
 
205
              rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
 
206
              ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
 
207
              ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
 
208
              cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
 
209
              echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
142
210
            fi; \
143
 
          fi; \
 
211
          done; \
144
212
        done
145
 
        if test "$(PACKAGE)" = "glib"; then \
146
 
          if test -r "$(MKINSTALLDIRS)"; then \
147
 
            $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
148
 
          else \
149
 
            $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
150
 
          fi; \
151
 
          $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
152
 
                          $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
 
213
 
 
214
install-strip: install
 
215
 
 
216
installdirs: installdirs-exec installdirs-data
 
217
installdirs-exec:
 
218
installdirs-data: installdirs-data-@USE_NLS@
 
219
        if test "$(PACKAGE)" = "gettext-tools"; then \
 
220
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
153
221
        else \
154
222
          : ; \
155
223
        fi
 
224
installdirs-data-no:
 
225
installdirs-data-yes:
 
226
        $(mkinstalldirs) $(DESTDIR)$(datadir)
 
227
        @catalogs='$(CATALOGS)'; \
 
228
        for cat in $$catalogs; do \
 
229
          cat=`basename $$cat`; \
 
230
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
 
231
          dir=$(localedir)/$$lang/LC_MESSAGES; \
 
232
          $(mkinstalldirs) $(DESTDIR)$$dir; \
 
233
          for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
 
234
            if test -n "$$lc"; then \
 
235
              if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
 
236
                link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
 
237
                mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
 
238
                mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
239
                (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
 
240
                 for file in *; do \
 
241
                   if test -f $$file; then \
 
242
                     ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
 
243
                   fi; \
 
244
                 done); \
 
245
                rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
 
246
              else \
 
247
                if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
 
248
                  :; \
 
249
                else \
 
250
                  rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
251
                  mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
 
252
                fi; \
 
253
              fi; \
 
254
            fi; \
 
255
          done; \
 
256
        done
156
257
 
157
258
# Define this as empty until I found a useful application.
158
259
installcheck:
159
260
 
160
 
uninstall:
 
261
uninstall: uninstall-exec uninstall-data
 
262
uninstall-exec:
 
263
uninstall-data: uninstall-data-@USE_NLS@
 
264
        if test "$(PACKAGE)" = "gettext-tools"; then \
 
265
          for file in $(DISTFILES.common) Makevars.template; do \
 
266
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
 
267
          done; \
 
268
        else \
 
269
          : ; \
 
270
        fi
 
271
uninstall-data-no:
 
272
uninstall-data-yes:
161
273
        catalogs='$(CATALOGS)'; \
162
274
        for cat in $$catalogs; do \
163
275
          cat=`basename $$cat`; \
164
 
          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
165
 
          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
166
 
          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
167
 
          rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
168
 
          rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
 
276
          lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
 
277
          for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
 
278
            rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
 
279
          done; \
169
280
        done
170
 
        rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
171
281
 
172
282
check: all
173
283
 
174
 
dvi info tags TAGS ID:
 
284
info dvi ps pdf html tags TAGS ctags CTAGS ID:
175
285
 
176
286
mostlyclean:
177
 
        rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
 
287
        rm -f remove-potcdate.sed
 
288
        rm -f stamp-poT
 
289
        rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
178
290
        rm -fr *.o
 
291
        rm -rf stamp-it .intltool-merge-cache
179
292
 
180
293
clean: mostlyclean
181
294
 
182
295
distclean: clean
183
 
        rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
 
296
        rm -f Makefile Makefile.in POTFILES *.mo
184
297
 
185
298
maintainer-clean: distclean
186
299
        @echo "This command is intended for maintainers to use;"
187
300
        @echo "it deletes files that may require special tools to rebuild."
188
 
        rm -f $(GMOFILES)
 
301
        rm -f stamp-po $(GMOFILES)
189
302
 
190
 
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
191
 
dist distdir: update-po $(DISTFILES)
 
303
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 
304
dist distdir:
 
305
        $(MAKE) update-po
 
306
        @$(MAKE) dist2
 
307
# This is a separate target because 'update-po' must be executed before.
 
308
dist2: stamp-po $(DISTFILES)
192
309
        dists="$(DISTFILES)"; \
 
310
        if test "$(PACKAGE)" = "gettext-tools"; then \
 
311
          dists="$$dists Makevars.template"; \
 
312
        fi; \
 
313
        if test -f $(srcdir)/$(DOMAIN).pot; then \
 
314
          dists="$$dists $(DOMAIN).pot stamp-po"; \
 
315
        fi; \
 
316
        if test -f $(srcdir)/ChangeLog; then \
 
317
          dists="$$dists ChangeLog"; \
 
318
        fi; \
 
319
        for i in 0 1 2 3 4 5 6 7 8 9; do \
 
320
          if test -f $(srcdir)/ChangeLog.$$i; then \
 
321
            dists="$$dists ChangeLog.$$i"; \
 
322
          fi; \
 
323
        done; \
 
324
        if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
193
325
        for file in $$dists; do \
194
 
          ln $(srcdir)/$$file $(distdir) 2> /dev/null \
195
 
            || cp -p $(srcdir)/$$file $(distdir); \
 
326
          if test -f $$file; then \
 
327
            cp -p $$file $(distdir) || exit 1; \
 
328
          else \
 
329
            cp -p $(srcdir)/$$file $(distdir) || exit 1; \
 
330
          fi; \
196
331
        done
197
332
 
198
333
update-po: Makefile
199
 
        $(MAKE) $(GETTEXT_PACKAGE).pot
200
 
        PATH=`pwd`/../src:$$PATH; \
 
334
        $(MAKE) $(DOMAIN).pot-update
 
335
        test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
 
336
        $(MAKE) update-gmo
 
337
 
 
338
# General rule for creating PO files.
 
339
 
 
340
.nop.po-create:
 
341
        @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
 
342
        echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
 
343
        exit 1
 
344
 
 
345
# General rule for updating PO files.
 
346
 
 
347
.nop.po-update:
 
348
        @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
 
349
        if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
 
350
        tmpdir=`pwd`; \
 
351
        echo "$$lang:"; \
 
352
        test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
 
353
        echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
201
354
        cd $(srcdir); \
202
 
        catalogs='$(CATALOGS)'; \
203
 
        for cat in $$catalogs; do \
204
 
          cat=`basename $$cat`; \
205
 
          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
206
 
          cp $$lang.po $$lang.old.po; \
207
 
          echo "$$lang:"; \
208
 
          if $(MSGMERGE) $$lang; then \
209
 
            rm -f $$lang.old.po; \
210
 
          else \
211
 
            echo "msgmerge for $$cat failed!"; \
212
 
            rm -f $$lang.po; \
213
 
            mv $$lang.old.po $$lang.po; \
214
 
          fi; \
215
 
        done
216
 
 
217
 
.po: Makefile
218
 
        $(MAKE)  $(PACKAGE).pot;
219
 
        PATH=`pwd`/../src:$$PATH; \
220
 
        echo; printf "$*: "; \
221
 
        if $(MSGMERGE) $*; then \
222
 
          rm -f $*.old.po; \
223
 
          else \
224
 
            echo "msgmerge for * failed!"; \
225
 
            mv $*.old.po $*.po; \
226
 
        fi; \
227
 
        msgfmt --statistics $*.po; echo;
228
 
 
229
 
 
230
 
# POTFILES is created from POTFILES.in by stripping comments, empty lines
231
 
# and Intltool tags (enclosed in square brackets), and appending a full
232
 
# relative path to them
233
 
POTFILES: POTFILES.in
234
 
        ( if test 'x$(srcdir)' != 'x.'; then \
235
 
            posrcprefix='$(top_srcdir)/'; \
236
 
          else \
237
 
            posrcprefix="../"; \
238
 
          fi; \
239
 
          rm -f $@-t $@ \
240
 
            && (sed -e '/^#/d'                                          \
241
 
                    -e "s/^\[.*\] +//"                                  \
242
 
                    -e '/^[     ]*$$/d'                                 \
243
 
                    -e "s@.*@   $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
244
 
                | sed -e '$$s/\\$$//') > $@-t \
245
 
            && chmod a-w $@-t \
246
 
            && mv $@-t $@ )
247
 
 
248
 
Makefile: Makefile.in.in ../config.status POTFILES
249
 
        cd .. \
 
355
        if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
 
356
          if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 
357
            rm -f $$tmpdir/$$lang.new.po; \
 
358
          else \
 
359
            if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
 
360
              :; \
 
361
            else \
 
362
              echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
 
363
              exit 1; \
 
364
            fi; \
 
365
          fi; \
 
366
        else \
 
367
          echo "msgmerge for $$lang.po failed!" 1>&2; \
 
368
          rm -f $$tmpdir/$$lang.new.po; \
 
369
        fi
 
370
 
 
371
$(DUMMYPOFILES):
 
372
 
 
373
update-gmo: Makefile $(GMOFILES)
 
374
        @:
 
375
 
 
376
Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
 
377
        cd $(top_builddir) \
250
378
          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
251
379
               $(SHELL) ./config.status
252
380
 
 
381
force:
 
382
 
253
383
# Tell versions [3.59,3.63) of GNU make not to export all variables.
254
384
# Otherwise a system limit (for SysV at least) may be exceeded.
255
385
.NOEXPORT: