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