~ubuntu-branches/ubuntu/lucid/groundhog/lucid

« back to all changes in this revision

Viewing changes to intl/Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Stephen M Moraco
  • Date: 2004-08-20 23:12:32 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040820231232-18s0op2f9g21ag1z
Tags: 1.4-6
Update Policy Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Makefile for directory with message catalog handling in GNU NLS Utilities.
2
 
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
 
2
# Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
3
3
#
4
 
# This program is free software; you can redistribute it and/or modify
5
 
# it under the terms of the GNU General Public License as published by
6
 
# the Free Software Foundation; either version 2, or (at your option)
 
4
# This program is free software; you can redistribute it and/or modify it
 
5
# under the terms of the GNU Library General Public License as published
 
6
# by the Free Software Foundation; either version 2, or (at your option)
7
7
# any later version.
8
8
#
9
9
# This program is distributed in the hope that it will be useful,
10
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 
# GNU General Public License for more details.
 
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
# Library General Public License for more details.
13
13
#
14
 
# You should have received a copy of the GNU General Public License
15
 
# along with this program; if not, write to the Free Software
16
 
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
14
# You should have received a copy of the GNU Library General Public
 
15
# License along with this program; if not, write to the Free Software
 
16
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
 
17
# USA.
17
18
 
18
19
PACKAGE = @PACKAGE@
19
20
VERSION = @VERSION@
28
29
prefix = @prefix@
29
30
exec_prefix = @exec_prefix@
30
31
transform = @program_transform_name@
31
 
libdir = $(exec_prefix)/lib
32
 
includedir = $(prefix)/include
33
 
datadir = $(prefix)/@DATADIRNAME@
 
32
libdir = @libdir@
 
33
includedir = @includedir@
 
34
datadir = @datadir@
34
35
localedir = $(datadir)/locale
35
 
gnulocaledir = $(prefix)/share/locale
36
 
gettextsrcdir = @datadir@/gettext/intl
37
 
aliaspath = $(localedir):.
 
36
gettextsrcdir = $(datadir)/gettext/intl
 
37
aliaspath = $(localedir)
38
38
subdir = intl
39
39
 
40
40
INSTALL = @INSTALL@
41
41
INSTALL_DATA = @INSTALL_DATA@
42
42
MKINSTALLDIRS = @MKINSTALLDIRS@
 
43
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
43
44
 
44
 
l = @l@
 
45
l = @INTL_LIBTOOL_SUFFIX_PREFIX@
45
46
 
46
47
AR = ar
47
48
CC = @CC@
48
49
LIBTOOL = @LIBTOOL@
49
50
RANLIB = @RANLIB@
 
51
YACC = @INTLBISON@ -y -d
 
52
YFLAGS = --name-prefix=__gettext
50
53
 
51
 
DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
52
 
-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
 
54
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
 
55
-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL @DEFS@
53
56
CPPFLAGS = @CPPFLAGS@
54
57
CFLAGS = @CFLAGS@
55
58
LDFLAGS = @LDFLAGS@
56
59
 
57
60
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
58
61
 
59
 
HEADERS = $(COMHDRS) libgettext.h loadinfo.h
60
 
COMHDRS = gettext.h gettextP.h hash-string.h
61
 
SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
 
62
HEADERS = $(COMHDRS) libgnuintl.h loadinfo.h
 
63
COMHDRS = gmo.h gettextP.h hash-string.h plural-exp.h eval-plural.h os2compat.h
 
64
SOURCES = $(COMSRCS) intl-compat.c
62
65
COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
63
66
finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
64
 
explodename.c
 
67
explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
 
68
plural-exp.c localcharset.c localename.c osdep.c os2compat.c
65
69
OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
66
70
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
67
 
explodename.$lo
68
 
CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
 
71
explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
 
72
plural.$lo plural-exp.$lo localcharset.$lo localename.$lo osdep.$lo
69
73
GETTOBJS = intl-compat.$lo
70
 
DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
71
 
xopen-msg.sed $(HEADERS) $(SOURCES)
 
74
DISTFILES.common = Makefile.in \
 
75
config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
 
76
DISTFILES.generated = plural.c
72
77
DISTFILES.normal = VERSION
73
 
DISTFILES.gettext = libintl.glibc intlh.inst.in
 
78
DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc
 
79
DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
 
80
COPYING.LIB-2 gettext.h libgettext.h plural-eval.c
 
81
 
 
82
# Libtool's library version information for libintl.
 
83
# Before making a gettext release, the gettext maintainer must change this
 
84
# according to the libtool documentation, section "Library interface versions".
 
85
# Maintainers of other packages that include the intl directory must *not*
 
86
# change these values.
 
87
LTV_CURRENT=2
 
88
LTV_REVISION=1
 
89
LTV_AGE=0
74
90
 
75
91
.SUFFIXES:
76
 
.SUFFIXES: .c .o .lo
 
92
.SUFFIXES: .c .y .o .lo .sin .sed
77
93
.c.o:
78
94
        $(COMPILE) $<
79
95
.c.lo:
80
96
        $(LIBTOOL) --mode=compile $(COMPILE) $<
81
97
 
82
 
INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
 
98
.y.c:
 
99
        $(YACC) $(YFLAGS) --output $@ $<
 
100
        rm -f $*.h
 
101
 
 
102
.sin.sed:
 
103
        sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
 
104
        mv t-$@ $@
 
105
 
 
106
INCLUDES = -I.. -I. -I$(top_srcdir)/intl
83
107
 
84
108
all: all-@USE_INCLUDED_LIBINTL@
85
 
 
86
 
all-yes: libintl.$la intlh.inst
87
 
all-no:
88
 
 
89
 
libintl.a: $(OBJECTS)
 
109
all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
 
110
all-no: all-no-@BUILD_INCLUDED_LIBINTL@
 
111
all-no-yes: libgnuintl.$la
 
112
all-no-no:
 
113
 
 
114
libintl.a libgnuintl.a: $(OBJECTS)
90
115
        rm -f $@
91
116
        $(AR) cru $@ $(OBJECTS)
92
117
        $(RANLIB) $@
93
118
 
94
 
libintl.la: $(OBJECTS)
95
 
        $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
96
 
                   -version-info 1:0 -rpath $(libdir)
97
 
 
98
 
../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
99
 
        cd ../po && $(MAKE) cat-id-tbl.$lo
 
119
libintl.la libgnuintl.la: $(OBJECTS)
 
120
        $(LIBTOOL) --mode=link \
 
121
          $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
 
122
          $(OBJECTS) @LTLIBICONV@ -lc \
 
123
          -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
 
124
          -rpath $(libdir) \
 
125
          -no-undefined
 
126
 
 
127
libintl.h: libgnuintl.h
 
128
        cp $(srcdir)/libgnuintl.h libintl.h
 
129
 
 
130
charset.alias: config.charset
 
131
        $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
 
132
        mv t-$@ $@
100
133
 
101
134
check: all
102
135
 
104
137
# only use the library should use install instead.
105
138
 
106
139
# We must not install the libintl.h/libintl.a files if we are on a
107
 
# system which has the gettext() function in its C library or in a
108
 
# separate library or use the catgets interface.  A special case is
109
 
# where configure found a previously installed GNU gettext library.
 
140
# system which has the GNU gettext() function in its C library or in a
 
141
# separate library.
110
142
# If you want to use the one which comes with this version of the
111
143
# package, you have to use `configure --with-included-gettext'.
112
144
install: install-exec install-data
113
145
install-exec: all
114
146
        if test "$(PACKAGE)" = "gettext" \
115
147
           && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
116
 
          if test -r $(MKINSTALLDIRS); then \
117
 
            $(MKINSTALLDIRS) $(libdir) $(includedir); \
 
148
          $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
 
149
          $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
 
150
          $(LIBTOOL) --mode=install \
 
151
            $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
 
152
        else \
 
153
          : ; \
 
154
        fi
 
155
        if test '@USE_INCLUDED_LIBINTL@' = yes; then \
 
156
          test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
 
157
          temp=$(DESTDIR)$(libdir)/t-charset.alias; \
 
158
          dest=$(DESTDIR)$(libdir)/charset.alias; \
 
159
          if test -f $(DESTDIR)$(libdir)/charset.alias; then \
 
160
            orig=$(DESTDIR)$(libdir)/charset.alias; \
 
161
            sed -f ref-add.sed $$orig > $$temp; \
 
162
            $(INSTALL_DATA) $$temp $$dest; \
 
163
            rm -f $$temp; \
118
164
          else \
119
 
            $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
 
165
            if test @GLIBC21@ = no; then \
 
166
              orig=charset.alias; \
 
167
              sed -f ref-add.sed $$orig > $$temp; \
 
168
              $(INSTALL_DATA) $$temp $$dest; \
 
169
              rm -f $$temp; \
 
170
            fi; \
120
171
          fi; \
121
 
          $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
122
 
          $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
 
172
          $(mkinstalldirs) $(DESTDIR)$(localedir); \
 
173
          test -f $(DESTDIR)$(localedir)/locale.alias \
 
174
            && orig=$(DESTDIR)$(localedir)/locale.alias \
 
175
            || orig=$(srcdir)/locale.alias; \
 
176
          temp=$(DESTDIR)$(localedir)/t-locale.alias; \
 
177
          dest=$(DESTDIR)$(localedir)/locale.alias; \
 
178
          sed -f ref-add.sed $$orig > $$temp; \
 
179
          $(INSTALL_DATA) $$temp $$dest; \
 
180
          rm -f $$temp; \
123
181
        else \
124
182
          : ; \
125
183
        fi
126
184
install-data: all
127
185
        if test "$(PACKAGE)" = "gettext"; then \
128
 
          if test -r $(MKINSTALLDIRS); then \
129
 
            $(MKINSTALLDIRS) $(gettextsrcdir); \
130
 
          else \
131
 
            $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
132
 
          fi; \
133
 
          $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
134
 
          dists="$(DISTFILES.common)"; \
135
 
          for file in $$dists; do \
136
 
            $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
137
 
          done; \
 
186
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
 
187
          $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
 
188
          $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
 
189
          dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
 
190
          for file in $$dists; do \
 
191
            $(INSTALL_DATA) $(srcdir)/$$file \
 
192
                            $(DESTDIR)$(gettextsrcdir)/$$file; \
 
193
          done; \
 
194
          chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
 
195
          dists="$(DISTFILES.generated)"; \
 
196
          for file in $$dists; do \
 
197
            if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
 
198
            $(INSTALL_DATA) $$dir/$$file \
 
199
                            $(DESTDIR)$(gettextsrcdir)/$$file; \
 
200
          done; \
 
201
          dists="$(DISTFILES.obsolete)"; \
 
202
          for file in $$dists; do \
 
203
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
 
204
          done; \
 
205
        else \
 
206
          : ; \
 
207
        fi
 
208
 
 
209
install-strip: install
 
210
 
 
211
installdirs:
 
212
        if test "$(PACKAGE)" = "gettext" \
 
213
           && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
 
214
          $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
 
215
        else \
 
216
          : ; \
 
217
        fi
 
218
        if test '@USE_INCLUDED_LIBINTL@' = yes; then \
 
219
          test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
 
220
          $(mkinstalldirs) $(DESTDIR)$(localedir); \
 
221
        else \
 
222
          : ; \
 
223
        fi
 
224
        if test "$(PACKAGE)" = "gettext"; then \
 
225
          $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
138
226
        else \
139
227
          : ; \
140
228
        fi
143
231
installcheck:
144
232
 
145
233
uninstall:
146
 
        dists="$(DISTFILES.common)"; \
147
 
        for file in $$dists; do \
148
 
          rm -f $(gettextsrcdir)/$$file; \
149
 
        done
 
234
        if test "$(PACKAGE)" = "gettext" \
 
235
           && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
 
236
          rm -f $(DESTDIR)$(includedir)/libintl.h; \
 
237
          $(LIBTOOL) --mode=uninstall \
 
238
            rm -f $(DESTDIR)$(libdir)/libintl.$la; \
 
239
        else \
 
240
          : ; \
 
241
        fi
 
242
        if test '@USE_INCLUDED_LIBINTL@' = yes; then \
 
243
          if test -f $(DESTDIR)$(libdir)/charset.alias; then \
 
244
            temp=$(DESTDIR)$(libdir)/t-charset.alias; \
 
245
            dest=$(DESTDIR)$(libdir)/charset.alias; \
 
246
            sed -f ref-del.sed $$dest > $$temp; \
 
247
            if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
 
248
              rm -f $$dest; \
 
249
            else \
 
250
              $(INSTALL_DATA) $$temp $$dest; \
 
251
            fi; \
 
252
            rm -f $$temp; \
 
253
          fi; \
 
254
          if test -f $(DESTDIR)$(localedir)/locale.alias; then \
 
255
            temp=$(DESTDIR)$(localedir)/t-locale.alias; \
 
256
            dest=$(DESTDIR)$(localedir)/locale.alias; \
 
257
            sed -f ref-del.sed $$dest > $$temp; \
 
258
            if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
 
259
              rm -f $$dest; \
 
260
            else \
 
261
              $(INSTALL_DATA) $$temp $$dest; \
 
262
            fi; \
 
263
            rm -f $$temp; \
 
264
          fi; \
 
265
        else \
 
266
          : ; \
 
267
        fi
 
268
        if test "$(PACKAGE)" = "gettext"; then \
 
269
          for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
 
270
            rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
 
271
          done; \
 
272
        else \
 
273
          : ; \
 
274
        fi
150
275
 
151
276
info dvi:
152
277
 
153
 
$(OBJECTS): ../config.h libgettext.h
154
 
bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
155
 
dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
 
278
$(OBJECTS): ../config.h libgnuintl.h
 
279
bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: gettextP.h gmo.h loadinfo.h
 
280
dcigettext.$lo: hash-string.h
 
281
explodename.$lo l10nflist.$lo: loadinfo.h
 
282
dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: plural-exp.h
 
283
dcigettext.$lo: eval-plural.h
156
284
 
157
285
tags: TAGS
158
286
 
166
294
 
167
295
 
168
296
mostlyclean:
169
 
        rm -f *.a *.o *.lo core core.*
 
297
        rm -f *.a *.la *.o *.lo core core.*
 
298
        rm -f libintl.h charset.alias ref-add.sed ref-del.sed
 
299
        rm -f -r .libs _libs
170
300
 
171
301
clean: mostlyclean
172
302
 
173
303
distclean: clean
174
 
        rm -f Makefile ID TAGS po2msg.sed po2tbl.sed
 
304
        rm -f Makefile ID TAGS
 
305
        if test "$(PACKAGE)" = gettext; then \
 
306
          rm -f ChangeLog.inst $(DISTFILES.normal); \
 
307
        else \
 
308
          : ; \
 
309
        fi
175
310
 
176
311
maintainer-clean: distclean
177
312
        @echo "This command is intended for maintainers to use;"
181
316
# GNU gettext needs not contain the file `VERSION' but contains some
182
317
# other files which should not be distributed in other packages.
183
318
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
184
 
dist distdir: Makefile $(DISTFILES)
 
319
dist distdir: Makefile
185
320
        if test "$(PACKAGE)" = gettext; then \
186
321
          additional="$(DISTFILES.gettext)"; \
187
322
        else \
188
323
          additional="$(DISTFILES.normal)"; \
189
324
        fi; \
190
 
        for file in $(DISTFILES.common) $$additional; do \
191
 
          ln $(srcdir)/$$file $(distdir) 2> /dev/null \
192
 
            || cp -p $(srcdir)/$$file $(distdir); \
 
325
        $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
 
326
        for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
 
327
          if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
 
328
          cp -p $$dir/$$file $(distdir); \
193
329
        done
194
330
 
195
 
dist-libc:
196
 
        tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
197
 
 
198
331
Makefile: Makefile.in ../config.status
199
332
        cd .. \
200
333
          && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
201
334
 
202
 
# The dependency for intlh.inst is different in gettext and all other
203
 
# packages.  Because we cannot you GNU make features we have to solve
204
 
# the problem while rewriting Makefile.in.
205
 
@GT_YES@intlh.inst: intlh.inst.in ../config.status
206
 
@GT_YES@        cd .. \
207
 
@GT_YES@        && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
208
 
@GT_YES@          $(SHELL) ./config.status
209
 
@GT_NO@.PHONY: intlh.inst
210
 
@GT_NO@intlh.inst:
211
 
 
212
335
# Tell versions [3.59,3.63) of GNU make not to export all variables.
213
336
# Otherwise a system limit (for SysV at least) may be exceeded.
214
337
.NOEXPORT: