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