Use of gettext.
[gedcom-parse.git] / intl / Makefile.in
1 # Makefile for directory with message catalog handling in GNU NLS Utilities.
2 # Copyright (C) 1995, 1996, 1997 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 = $(exec_prefix)/lib
32 includedir = $(prefix)/include
33 datadir = $(prefix)/@DATADIRNAME@
34 localedir = $(datadir)/locale
35 gnulocaledir = $(prefix)/share/locale
36 gettextsrcdir = $(datadir)/gettext/intl
37 aliaspath = $(localedir):.
38 subdir = intl
39
40 DESTDIR =
41
42 INSTALL = @INSTALL@
43 INSTALL_DATA = @INSTALL_DATA@
44 MKINSTALLDIRS = @MKINSTALLDIRS@
45
46 l = @l@
47
48 AR = ar
49 CC = @CC@
50 LIBTOOL = @LIBTOOL@
51 RANLIB = @RANLIB@
52
53 DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
54 -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
55 CPPFLAGS = @CPPFLAGS@
56 CFLAGS = @CFLAGS@
57 LDFLAGS = @LDFLAGS@
58
59 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
60
61 HEADERS = $(COMHDRS) libgettext.h loadinfo.h
62 COMHDRS = gettext.h gettextP.h hash-string.h
63 SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
64 COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
65 finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
66 explodename.c
67 OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
68 finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
69 explodename.$lo
70 CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
71 GETTOBJS = intl-compat.$lo
72 DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
73 xopen-msg.sed $(HEADERS) $(SOURCES)
74 DISTFILES.normal = VERSION
75 DISTFILES.gettext = libintl.glibc intlh.inst.in
76
77 .SUFFIXES:
78 .SUFFIXES: .c .o .lo
79 .c.o:
80         $(COMPILE) $<
81 .c.lo:
82         $(LIBTOOL) --mode=compile $(COMPILE) $<
83
84 INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
85
86 all: all-@USE_INCLUDED_LIBINTL@
87
88 all-yes: libintl.$la intlh.inst
89 all-no:
90
91 libintl.a: $(OBJECTS)
92         rm -f $@
93         $(AR) cru $@ $(OBJECTS)
94         $(RANLIB) $@
95
96 libintl.la: $(OBJECTS)
97         $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
98                    -version-info 1:0 -rpath $(libdir)
99
100 ../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
101         cd ../po && $(MAKE) cat-id-tbl.$lo
102
103 check: all
104
105 # This installation goal is only used in GNU gettext.  Packages which
106 # only use the library should use install instead.
107
108 # We must not install the libintl.h/libintl.a files if we are on a
109 # system which has the gettext() function in its C library or in a
110 # separate library or use the catgets interface.  A special case is
111 # where configure found a previously installed GNU gettext library.
112 # If you want to use the one which comes with this version of the
113 # package, you have to use `configure --with-included-gettext'.
114 install: install-exec install-data
115 install-exec: all
116         if test "$(PACKAGE)" = "gettext" \
117            && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
118           if test -r $(MKINSTALLDIRS); then \
119             $(MKINSTALLDIRS) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
120           else \
121             $(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
122           fi; \
123           $(INSTALL_DATA) intlh.inst $(DESTDIR)$(includedir)/libintl.h; \
124           $(INSTALL_DATA) libintl.a $(DESTDIR)$(libdir)/libintl.a; \
125         else \
126           : ; \
127         fi
128 install-data: all
129         if test "$(PACKAGE)" = "gettext"; then \
130           if test -r $(MKINSTALLDIRS); then \
131             $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
132           else \
133             $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
134           fi; \
135           $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
136           dists="$(DISTFILES.common)"; \
137           for file in $$dists; do \
138             $(INSTALL_DATA) $(srcdir)/$$file $(DESTDIR)$(gettextsrcdir)/$$file; \
139           done; \
140         else \
141           : ; \
142         fi
143
144 # Define this as empty until I found a useful application.
145 installcheck:
146
147 uninstall:
148         dists="$(DISTFILES.common)"; \
149         for file in $$dists; do \
150           rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
151         done
152
153 info dvi:
154
155 $(OBJECTS): ../config.h libgettext.h
156 bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
157 dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
158
159 tags: TAGS
160
161 TAGS: $(HEADERS) $(SOURCES)
162         here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
163
164 id: ID
165
166 ID: $(HEADERS) $(SOURCES)
167         here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
168
169
170 mostlyclean:
171         rm -f *.a *.o *.lo core core.*
172
173 clean: mostlyclean
174
175 distclean: clean
176         rm -f Makefile ID TAGS po2msg.sed po2tbl.sed
177
178 maintainer-clean: distclean
179         @echo "This command is intended for maintainers to use;"
180         @echo "it deletes files that may require special tools to rebuild."
181
182
183 # GNU gettext needs not contain the file `VERSION' but contains some
184 # other files which should not be distributed in other packages.
185 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
186 dist distdir: Makefile $(DISTFILES)
187         if test "$(PACKAGE)" = gettext; then \
188           additional="$(DISTFILES.gettext)"; \
189         else \
190           additional="$(DISTFILES.normal)"; \
191         fi; \
192         for file in $(DISTFILES.common) $$additional; do \
193           ln $(srcdir)/$$file $(distdir) 2> /dev/null \
194             || cp -p $(srcdir)/$$file $(distdir); \
195         done
196
197 dist-libc:
198         tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
199
200 Makefile: Makefile.in ../config.status
201         cd .. \
202           && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
203
204 # The dependency for intlh.inst is different in gettext and all other
205 # packages.  Because we cannot you GNU make features we have to solve
206 # the problem while rewriting Makefile.in.
207 @GT_YES@intlh.inst: intlh.inst.in ../config.status
208 @GT_YES@        cd .. \
209 @GT_YES@        && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
210 @GT_YES@          $(SHELL) ./config.status
211 @GT_NO@.PHONY: intlh.inst
212 @GT_NO@intlh.inst:
213
214 # Tell versions [3.59,3.63) of GNU make not to export all variables.
215 # Otherwise a system limit (for SysV at least) may be exceeded.
216 .NOEXPORT: