~ubuntu-branches/ubuntu/trusty/wget/trusty-updates

« back to all changes in this revision

Viewing changes to po/Makefile.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2009-12-12 08:15:59 UTC
  • mfrom: (2.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091212081559-mvccl4kzdqb138y3
Tags: 1.12-1.1ubuntu1
* Merge from debian testing, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
* Keep build dependencies in main:
  - debian/control: remove info2man build-dep
  - debian/patches/00list: disable wget-infopod_generated_manpage.dpatch

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