~ubuntu-branches/debian/experimental/inkscape/experimental

« back to all changes in this revision

Viewing changes to po/Makefile.in.in

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Viehmann
  • Date: 2008-09-09 23:29:02 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20080909232902-c50iujhk1w79u8e7
Tags: 0.46-2.1
* Non-maintainer upload.
* Add upstream patch fixing a crash in the open dialog
  in the zh_CN.utf8 locale. Closes: #487623.
  Thanks to Luca Bruno for the patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Makefile for program source directory in GNU NLS utilities package.
2
2
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
 
3
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
3
4
#
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
 
5
# This file may be copied and used freely without restrictions.  It may
 
6
# be used in projects which are not available under a GNU Public License,
6
7
# but which still want to provide support for the GNU gettext functionality.
7
 
# Please note that the actual code is *not* freely available.
8
8
#
9
9
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
10
10
#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
12
12
# - Modified by jacob berkman <jacob@ximian.com> to install
13
13
#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
14
14
#
15
 
# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
 
15
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
16
16
#
17
17
# We have the following line for use by intltoolize:
18
18
# INTLTOOL_MAKEFILE
22
22
VERSION = @VERSION@
23
23
 
24
24
SHELL = /bin/sh
25
 
@SET_MAKE@
26
25
 
27
26
srcdir = @srcdir@
28
27
top_srcdir = @top_srcdir@
29
 
top_builddir = ..
 
28
top_builddir = @top_builddir@
30
29
VPATH = @srcdir@
31
30
 
32
31
prefix = @prefix@
34
33
datadir = @datadir@
35
34
datarootdir = @datarootdir@
36
35
libdir = @libdir@
37
 
localedir = $(libdir)/locale
38
 
gnulocaledir = $(datadir)/locale
39
 
gettextsrcdir = $(datadir)/glib-2.0/gettext/po
 
36
DATADIRNAME = @DATADIRNAME@
 
37
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
40
38
subdir = po
41
39
install_sh = @install_sh@
42
 
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
 
40
# Automake >= 1.8 provides @mkdir_p@.
 
41
# Until it can be supposed, use the safe fallback:
 
42
mkdir_p = $(install_sh) -d
43
43
 
44
44
INSTALL = @INSTALL@
45
45
INSTALL_DATA = @INSTALL_DATA@
46
46
 
47
 
CC = @CC@
48
 
GENCAT = @GENCAT@
49
47
GMSGFMT = @GMSGFMT@
50
48
MSGFMT = @MSGFMT@
51
49
XGETTEXT = @XGETTEXT@
54
52
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
55
53
GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
56
54
 
57
 
DEFS = @DEFS@
58
 
CFLAGS = @CFLAGS@
59
 
CPPFLAGS = @CPPFLAGS@
60
 
 
61
 
INCLUDES = -I.. -I$(top_srcdir)/intl
62
 
 
63
 
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
64
 
 
65
 
SOURCES = 
66
 
POFILES = @POFILES@
67
 
GMOFILES = @GMOFILES@
68
 
DISTFILES = ChangeLog Makefile.in.in POTFILES.in \
69
 
$(POFILES) $(SOURCES)
 
55
ALL_LINGUAS = @ALL_LINGUAS@
 
56
 
 
57
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
 
58
 
 
59
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
 
60
 
 
61
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
 
62
 
 
63
POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
 
64
 
 
65
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
70
66
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
71
67
 
72
68
POTFILES = \
 
69
# This comment gets stripped out
73
70
 
74
 
CATALOGS = @CATALOGS@
75
 
CATOBJEXT = @CATOBJEXT@
76
 
INSTOBJEXT = @INSTOBJEXT@
 
71
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
77
72
 
78
73
.SUFFIXES:
79
 
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
80
 
 
81
 
.c.o:
82
 
        $(COMPILE) $<
 
74
.SUFFIXES: .po .pox .gmo .mo .msg .cat
83
75
 
84
76
.po.pox:
85
77
        $(MAKE) $(GETTEXT_PACKAGE).pot
94
86
 
95
87
.po.cat:
96
88
        sed -f ../intl/po2msg.sed < $< > $*.msg \
97
 
          && rm -f $@ && $(GENCAT) $@ $*.msg
 
89
          && rm -f $@ && gencat $@ $*.msg
98
90
 
99
91
 
100
92
all: all-@USE_NLS@
105
97
$(GETTEXT_PACKAGE).pot: $(POTFILES)
106
98
        $(GENPOT)
107
99
 
108
 
install: install-exec install-data
109
 
install-exec:
 
100
install: install-data
110
101
install-data: install-data-@USE_NLS@
111
102
install-data-no: all
112
103
install-data-yes: all
113
 
        if test -n "$(MKINSTALLDIRS)"; then \
114
 
          $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
115
 
        else \
116
 
          $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
117
 
        fi
118
 
        @catalogs='$(CATALOGS)'; \
119
 
        for cat in $$catalogs; do \
120
 
          cat=`basename $$cat`; \
121
 
          case "$$cat" in \
122
 
            *.gmo) destdir=$(gnulocaledir);; \
123
 
            *)     destdir=$(localedir);; \
124
 
          esac; \
125
 
          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
126
 
          dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
127
 
          if test -n "$(MKINSTALLDIRS)"; then \
128
 
            $(MKINSTALLDIRS) $$dir; \
129
 
          else \
130
 
            $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
131
 
          fi; \
132
 
          if test -r $$cat; then \
133
 
            $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
134
 
            echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
135
 
          else \
136
 
            $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
137
 
            echo "installing $(srcdir)/$$cat as" \
138
 
                 "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
139
 
          fi; \
140
 
          if test -r $$cat.m; then \
141
 
            $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
142
 
            echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
143
 
          else \
144
 
            if test -r $(srcdir)/$$cat.m ; then \
145
 
              $(INSTALL_DATA) $(srcdir)/$$cat.m \
146
 
                $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
147
 
              echo "installing $(srcdir)/$$cat as" \
148
 
                   "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
 
104
        $(mkdir_p) $(DESTDIR)$(itlocaledir)
 
105
        linguas="$(USE_LINGUAS)"; \
 
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"; \
149
126
            else \
150
127
              true; \
151
128
            fi; \
152
129
          fi; \
153
130
        done
154
 
        if test "$(PACKAGE)" = "glib"; then \
155
 
          if test -n "$(MKINSTALLDIRS)"; then \
156
 
            $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
157
 
          else \
158
 
            $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
159
 
          fi; \
160
 
          $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
161
 
                          $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
162
 
        else \
163
 
          : ; \
164
 
        fi
 
131
 
 
132
# Empty stubs to satisfy archaic automake needs
 
133
dvi info tags TAGS ID:
165
134
 
166
135
# Define this as empty until I found a useful application.
167
 
installcheck:
 
136
install-exec installcheck:
168
137
 
169
138
uninstall:
170
 
        catalogs='$(CATALOGS)'; \
171
 
        for cat in $$catalogs; do \
172
 
          cat=`basename $$cat`; \
173
 
          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
174
 
          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
175
 
          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
176
 
          rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
177
 
          rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
 
139
        linguas="$(USE_LINGUAS)"; \
 
140
        for lang in $$linguas; do \
 
141
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
 
142
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
178
143
        done
179
 
        if test "$(PACKAGE)" = "glib"; then \
180
 
          rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
181
 
        fi
182
144
 
183
145
check: all $(GETTEXT_PACKAGE).pot
184
 
 
185
 
dvi info tags TAGS ID:
 
146
        rm -f missing notexist
 
147
        srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
 
148
        if [ -r missing -o -r notexist ]; then \
 
149
          exit 1; \
 
150
        fi
186
151
 
187
152
mostlyclean:
188
 
        rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
189
 
        rm -fr *.o
 
153
        rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
190
154
        rm -f .intltool-merge-cache
191
155
 
192
156
clean: mostlyclean
193
157
 
194
158
distclean: clean
195
 
        rm -f Makefile Makefile.in POTFILES
196
 
        rm -f *.mo *.msg *.cat *.cat.m $(GMOFILES)
 
159
        rm -f Makefile Makefile.in POTFILES stamp-it
 
160
        rm -f *.mo *.msg *.cat *.cat.m *.gmo
197
161
 
198
162
maintainer-clean: distclean
199
163
        @echo "This command is intended for maintainers to use;"
200
164
        @echo "it deletes files that may require special tools to rebuild."
201
165
        rm -f Makefile.in.in
202
166
 
203
 
distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
 
167
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
204
168
dist distdir: $(DISTFILES)
205
169
        dists="$(DISTFILES)"; \
206
170
        extra_dists="$(EXTRA_DISTFILES)"; \
207
171
        for file in $$extra_dists; do \
208
 
          test -f $$file && dists="$$dists $$file"; \
 
172
          test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
209
173
        done; \
210
174
        for file in $$dists; do \
211
 
          ln $(srcdir)/$$file $(distdir) 2> /dev/null \
212
 
            || cp -p $(srcdir)/$$file $(distdir); \
 
175
          test -f $$file || file="$(srcdir)/$$file"; \
 
176
          ln $$file $(distdir) 2> /dev/null \
 
177
            || cp -p $$file $(distdir); \
213
178
        done
214
179
 
215
180
update-po: Makefile
216
181
        $(MAKE) $(GETTEXT_PACKAGE).pot
217
182
        tmpdir=`pwd`; \
218
 
        catalogs='$(CATALOGS)'; \
219
 
        for cat in $$catalogs; do \
220
 
          cat=`basename $$cat`; \
221
 
          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
 
183
        linguas="$(USE_LINGUAS)"; \
 
184
        for lang in $$linguas; do \
222
185
          echo "$$lang:"; \
223
186
          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
224
187
          if $$result; then \
234
197
              fi; \
235
198
            fi; \
236
199
          else \
237
 
            echo "msgmerge for $$cat failed!"; \
 
200
            echo "msgmerge for $$lang.gmo failed!"; \
238
201
            rm -f $$tmpdir/$$lang.new.po; \
239
202
          fi; \
240
203
        done
241
204
 
242
 
# POTFILES is created from POTFILES.in by stripping comments, empty lines
243
 
# and Intltool tags (enclosed in square brackets), and appending a full
244
 
# relative path to them
245
 
POTFILES: POTFILES.in
246
 
        ( posrcprefix='$(top_srcdir)/'; \
247
 
          rm -f $@-t $@ \
248
 
            && (sed -e '/^#/d'                                  \
249
 
                    -e 's/^[[].*] *//'                          \
250
 
                    -e '/^[     ]*$$/d'                         \
251
 
                    -e "s@^@    $$posrcprefix@" $(srcdir)/$@.in \
252
 
                | sed -e '$$!s/$$/ \\/') > $@-t \
253
 
            && chmod a-w $@-t \
254
 
            && mv $@-t $@ )
 
205
Makefile POTFILES: stamp-it
 
206
        @if test ! -f $@; then \
 
207
          rm -f stamp-it; \
 
208
          $(MAKE) stamp-it; \
 
209
        fi
255
210
 
256
 
Makefile: Makefile.in.in ../config.status POTFILES
257
 
        cd .. \
258
 
          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
 
211
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
 
212
        cd $(top_builddir) \
 
213
          && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
259
214
               $(SHELL) ./config.status
260
215
 
261
216
# Tell versions [3.59,3.63) of GNU make not to export all variables.