~ubuntu-branches/ubuntu/vivid/gedit-plugins/vivid-proposed

« back to all changes in this revision

Viewing changes to po/Makefile.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2006-07-10 11:50:19 UTC
  • Revision ID: james.westby@ubuntu.com-20060710115019-ohx55807af5f36bq
Tags: upstream-2.15.3
ImportĀ upstreamĀ versionĀ 2.15.3

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
 
14
#
 
15
# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
 
16
#
 
17
# We have the following line for use by intltoolize:
 
18
# INTLTOOL_MAKEFILE
 
19
 
 
20
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 
21
PACKAGE = @PACKAGE@
 
22
VERSION = @VERSION@
 
23
 
 
24
SHELL = /bin/sh
 
25
 
 
26
srcdir = @srcdir@
 
27
top_srcdir = @top_srcdir@
 
28
top_builddir = ..
 
29
VPATH = @srcdir@
 
30
 
 
31
prefix = @prefix@
 
32
exec_prefix = @exec_prefix@
 
33
datadir = @datadir@
 
34
datarootdir = @datarootdir@
 
35
libdir = @libdir@
 
36
DATADIRNAME = @DATADIRNAME@
 
37
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
 
38
subdir = po
 
39
install_sh = @install_sh@
 
40
# Automake >= 1.8 provides @mkdir_p@.
 
41
# Until it can be supposed, use the safe fallback:
 
42
mkdir_p = $(install_sh) -d
 
43
 
 
44
INSTALL = @INSTALL@
 
45
INSTALL_DATA = @INSTALL_DATA@
 
46
 
 
47
GMSGFMT = @GMSGFMT@
 
48
MSGFMT = @MSGFMT@
 
49
XGETTEXT = @XGETTEXT@
 
50
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
 
51
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
 
52
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
 
53
GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
 
54
 
 
55
ALL_LINGUAS = @ALL_LINGUAS@
 
56
 
 
57
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
 
58
 
 
59
POFILES=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.po "; done)
 
60
 
 
61
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
 
62
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
 
63
 
 
64
POTFILES = \
 
65
#This Gets Replace for some reason
 
66
 
 
67
CATALOGS=$(shell if test -n "$(PO_LINGUAS)"; then LINGUAS="$(PO_LINGUAS)"; else LINGUAS="$(ALL_LINGUAS)"; fi; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
 
68
 
 
69
.SUFFIXES:
 
70
.SUFFIXES: .po .pox .gmo .mo .msg .cat
 
71
 
 
72
.po.pox:
 
73
        $(MAKE) $(GETTEXT_PACKAGE).pot
 
74
        $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
 
75
 
 
76
.po.mo:
 
77
        $(MSGFMT) -o $@ $<
 
78
 
 
79
.po.gmo:
 
80
        file=`echo $* | sed 's,.*/,,'`.gmo \
 
81
          && rm -f $$file && $(GMSGFMT) -o $$file $<
 
82
 
 
83
.po.cat:
 
84
        sed -f ../intl/po2msg.sed < $< > $*.msg \
 
85
          && rm -f $@ && gencat $@ $*.msg
 
86
 
 
87
 
 
88
all: all-@USE_NLS@
 
89
 
 
90
all-yes: $(CATALOGS)
 
91
all-no:
 
92
 
 
93
$(GETTEXT_PACKAGE).pot: $(POTFILES)
 
94
        $(GENPOT)
 
95
 
 
96
install: install-data
 
97
install-data: install-data-@USE_NLS@
 
98
install-data-no: all
 
99
install-data-yes: all
 
100
        $(mkdir_p) $(DESTDIR)$(itlocaledir)
 
101
        if test -n "$(PO_LINGUAS)"; then \
 
102
          linguas="$(PO_LINGUAS)"; \
 
103
        else \
 
104
          linguas="$(ALL_LINGUAS)"; \
 
105
        fi; \
 
106
        for lang in $$linguas; do \
 
107
          dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
 
108
          $(mkdir_p) $$dir; \
 
109
          if test -r $$lang.gmo; then \
 
110
            $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
111
            echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
 
112
          else \
 
113
            $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
114
            echo "installing $(srcdir)/$$lang.gmo as" \
 
115
                 "$$dir/$(GETTEXT_PACKAGE).mo"; \
 
116
          fi; \
 
117
          if test -r $$lang.gmo.m; then \
 
118
            $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
119
            echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
120
          else \
 
121
            if test -r $(srcdir)/$$lang.gmo.m ; then \
 
122
              $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
 
123
                $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
124
              echo "installing $(srcdir)/$$lang.gmo.m as" \
 
125
                   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
126
            else \
 
127
              true; \
 
128
            fi; \
 
129
          fi; \
 
130
        done
 
131
 
 
132
# Empty stubs to satisfy archaic automake needs
 
133
dvi info tags TAGS ID:
 
134
 
 
135
# Define this as empty until I found a useful application.
 
136
installcheck:
 
137
 
 
138
uninstall:
 
139
        if test -n "$(PO_LINGUAS)"; then \
 
140
          linguas="$(PO_LINGUAS)"; \
 
141
        else \
 
142
          linguas="$(ALL_LINGUAS)"; \
 
143
        fi; \
 
144
        for lang in $$linguas; do \
 
145
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
 
146
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
 
147
        done
 
148
 
 
149
check: all $(GETTEXT_PACKAGE).pot
 
150
 
 
151
mostlyclean:
 
152
        rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
 
153
        rm -f .intltool-merge-cache
 
154
 
 
155
clean: mostlyclean
 
156
 
 
157
distclean: clean
 
158
        rm -f Makefile Makefile.in POTFILES stamp-it
 
159
        rm -f *.mo *.msg *.cat *.cat.m *.gmo
 
160
 
 
161
maintainer-clean: distclean
 
162
        @echo "This command is intended for maintainers to use;"
 
163
        @echo "it deletes files that may require special tools to rebuild."
 
164
        rm -f Makefile.in.in
 
165
 
 
166
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
 
167
dist distdir: $(DISTFILES)
 
168
        dists="$(DISTFILES)"; \
 
169
        extra_dists="$(EXTRA_DISTFILES)"; \
 
170
        for file in $$extra_dists; do \
 
171
          test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
 
172
        done; \
 
173
        for file in $$dists; do \
 
174
          test -f $$file || file="$(srcdir)/$$file"; \
 
175
          ln $$file $(distdir) 2> /dev/null \
 
176
            || cp -p $$file $(distdir); \
 
177
        done
 
178
 
 
179
update-po: Makefile
 
180
        $(MAKE) $(GETTEXT_PACKAGE).pot
 
181
        tmpdir=`pwd`; \
 
182
        if test -n "$(PO_LINGUAS)"; then \
 
183
          linguas="$(PO_LINGUAS)"; \
 
184
        else \
 
185
          linguas="$(ALL_LINGUAS)"; \
 
186
        fi; \
 
187
        for lang in $$linguas; do \
 
188
          echo "$$lang:"; \
 
189
          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
 
190
          if $$result; then \
 
191
            if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 
192
              rm -f $$tmpdir/$$lang.new.po; \
 
193
            else \
 
194
              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
 
195
                :; \
 
196
              else \
 
197
                echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
 
198
                rm -f $$tmpdir/$$lang.new.po; \
 
199
                exit 1; \
 
200
              fi; \
 
201
            fi; \
 
202
          else \
 
203
            echo "msgmerge for $$lang.gmo failed!"; \
 
204
            rm -f $$tmpdir/$$lang.new.po; \
 
205
          fi; \
 
206
        done
 
207
 
 
208
Makefile POTFILES: stamp-it
 
209
        @if test ! -f $@; then \
 
210
          rm -f stamp-it; \
 
211
          $(MAKE) stamp-it; \
 
212
        fi
 
213
 
 
214
stamp-it: Makefile.in.in ../config.status POTFILES.in
 
215
        cd .. \
 
216
          && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
 
217
               $(SHELL) ./config.status
 
218
 
 
219
# Tell versions [3.59,3.63) of GNU make not to export all variables.
 
220
# Otherwise a system limit (for SysV at least) may be exceeded.
 
221
.NOEXPORT: