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