c5245d4c865f685f2ce98938350d3224bee15c2e
[platform/upstream/bash.git] / lib / intl / Makefile.in
1 # Makefile for directory with message catalog handling library of GNU gettext
2 # Copyright (C) 1995-1998, 2000-2003, 2008,2009 Free Software Foundation, Inc.
3 #
4
5 #   This program is free software: you can redistribute it and/or modify
6 #   it under the terms of the GNU General Public License as published by
7 #   the Free Software Foundation, either version 3 of the License, or
8 #   (at your option) any later version.
9
10 #   This program is distributed in the hope that it will be useful,
11 #   but WITHOUT ANY WARRANTY; without even the implied warranty of
12 #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 #   GNU General Public License for more details.
14
15 #   You should have received a copy of the GNU General Public License
16 #   along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18 PACKAGE = @PACKAGE_NAME@
19 VERSION = @PACKAGE_VERSION@
20
21 SHELL = /bin/sh
22
23 srcdir = @srcdir@
24 top_srcdir = @top_srcdir@
25 top_builddir = @BUILD_DIR@
26 VPATH = $(srcdir)
27
28 prefix = @prefix@
29 exec_prefix = @exec_prefix@
30 transform = @program_transform_name@
31
32 datarootdir = @datarootdir@
33
34 libdir = @libdir@
35 includedir = @includedir@
36 datadir = @datadir@
37 localedir = @localedir@
38
39 gettextsrcdir = $(datadir)/gettext/intl
40 aliaspath = $(localedir)
41 subdir = intl
42
43 @SET_MAKE@
44
45 INSTALL = @INSTALL@
46 INSTALL_DATA = @INSTALL_DATA@
47 MKINSTALLDIRS = @MKINSTALLDIRS@
48 mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
49
50 l = @INTL_LIBTOOL_SUFFIX_PREFIX@
51
52 AR = ar
53 CC = @CC@
54 LIBTOOL = @LIBTOOL@
55 RANLIB = @RANLIB@
56 YACC = @INTLBISON@ -y -d
57 YFLAGS = --name-prefix=__gettext
58
59 LOCAL_DEFS = @LOCAL_DEFS@
60
61 DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
62 -DLIBDIR=\"$(prefix)/libdata\" -DIN_LIBINTL \
63 -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
64 -Dset_relocation_prefix=libintl_set_relocation_prefix \
65 -Drelocate=libintl_relocate \
66 -DDEPENDS_ON_LIBICONV=1 @DEFS@ ${LOCAL_DEFS}
67 CPPFLAGS = @CPPFLAGS@
68 CFLAGS = @CFLAGS@
69 LDFLAGS = @LDFLAGS@
70 LIBS = @LIBS@
71
72 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
73
74 HEADERS = \
75   gmo.h \
76   gettextP.h \
77   hash-string.h \
78   loadinfo.h \
79   plural-exp.h \
80   eval-plural.h \
81   localcharset.h \
82   relocatable.h \
83   os2compat.h \
84   libgnuintl.h.in
85 SOURCES = \
86   bindtextdom.c \
87   dcgettext.c \
88   dgettext.c \
89   gettext.c \
90   finddomain.c \
91   loadmsgcat.c \
92   localealias.c \
93   textdomain.c \
94   l10nflist.c \
95   explodename.c \
96   dcigettext.c \
97   dcngettext.c \
98   dngettext.c \
99   ngettext.c \
100   plural.y \
101   plural-exp.c \
102   localcharset.c \
103   relocatable.c \
104   localename.c \
105   log.c \
106   osdep.c \
107   os2compat.c \
108   intl-compat.c
109 OBJECTS = \
110   bindtextdom.$lo \
111   dcgettext.$lo \
112   dgettext.$lo \
113   gettext.$lo \
114   finddomain.$lo \
115   loadmsgcat.$lo \
116   localealias.$lo \
117   textdomain.$lo \
118   l10nflist.$lo \
119   explodename.$lo \
120   dcigettext.$lo \
121   dcngettext.$lo \
122   dngettext.$lo \
123   ngettext.$lo \
124   plural.$lo \
125   plural-exp.$lo \
126   localcharset.$lo \
127   relocatable.$lo \
128   localename.$lo \
129   log.$lo \
130   osdep.$lo \
131   intl-compat.$lo
132 DISTFILES.common = Makefile.in \
133 config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
134 DISTFILES.generated = plural.c
135 DISTFILES.normal = VERSION
136 DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
137 Makefile.vms libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
138 DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
139 COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
140
141 all: all-@USE_INCLUDED_LIBINTL@
142 all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
143 all-no: all-no-@BUILD_INCLUDED_LIBINTL@
144 all-no-yes: libgnuintl.$la
145 all-no-no:
146
147 libintl.a libgnuintl.a: $(OBJECTS)
148         rm -f $@
149         $(AR) cru $@ $(OBJECTS)
150         $(RANLIB) $@
151
152 libintl.la libgnuintl.la: $(OBJECTS)
153         $(LIBTOOL) --mode=link \
154           $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
155           $(OBJECTS) @LTLIBICONV@ $(LIBS) \
156           -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
157           -rpath $(libdir) \
158           -no-undefined
159
160 # Libtool's library version information for libintl.
161 # Before making a gettext release, the gettext maintainer must change this
162 # according to the libtool documentation, section "Library interface versions".
163 # Maintainers of other packages that include the intl directory must *not*
164 # change these values.
165 LTV_CURRENT=5
166 LTV_REVISION=0
167 LTV_AGE=3
168
169 .SUFFIXES:
170 .SUFFIXES: .c .y .o .lo .sin .sed
171
172 .c.o:
173         $(COMPILE) $<
174
175 .y.c:
176         $(YACC) $(YFLAGS) --output $@ $<
177         rm -f $*.h
178
179 bindtextdom.lo: $(srcdir)/bindtextdom.c
180         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
181 dcgettext.lo: $(srcdir)/dcgettext.c
182         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
183 dgettext.lo: $(srcdir)/dgettext.c
184         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
185 gettext.lo: $(srcdir)/gettext.c
186         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
187 finddomain.lo: $(srcdir)/finddomain.c
188         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
189 loadmsgcat.lo: $(srcdir)/loadmsgcat.c
190         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
191 localealias.lo: $(srcdir)/localealias.c
192         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
193 textdomain.lo: $(srcdir)/textdomain.c
194         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
195 l10nflist.lo: $(srcdir)/l10nflist.c
196         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
197 explodename.lo: $(srcdir)/explodename.c
198         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
199 dcigettext.lo: $(srcdir)/dcigettext.c
200         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
201 dcngettext.lo: $(srcdir)/dcngettext.c
202         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
203 dngettext.lo: $(srcdir)/dngettext.c
204         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
205 ngettext.lo: $(srcdir)/ngettext.c
206         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
207 plural.lo: $(srcdir)/plural.c
208         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
209 plural-exp.lo: $(srcdir)/plural-exp.c
210         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
211 localcharset.lo: $(srcdir)/localcharset.c
212         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
213 relocatable.lo: $(srcdir)/relocatable.c
214         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
215 localename.lo: $(srcdir)/localename.c
216         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
217 log.lo: $(srcdir)/log.c
218         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
219 osdep.lo: $(srcdir)/osdep.c
220         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
221 intl-compat.lo: $(srcdir)/intl-compat.c
222         $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
223
224 ref-add.sed: $(srcdir)/ref-add.sin
225         sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
226         mv t-ref-add.sed ref-add.sed
227 ref-del.sed: $(srcdir)/ref-del.sin
228         sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
229         mv t-ref-del.sed ref-del.sed
230
231 INCLUDES = -I. -I$(srcdir) -I${top_builddir} -I${top_srcdir}
232
233 libgnuintl.h: $(srcdir)/libgnuintl.h.in
234         cp $(srcdir)/libgnuintl.h.in libgnuintl.h
235
236 libintl.h: libgnuintl.h
237         cmp libgnuintl.h libintl.h || cp libgnuintl.h libintl.h
238
239 charset.alias: $(srcdir)/config.charset
240         $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
241         mv t-$@ $@
242
243 check: all
244
245 # We must not install the libintl.h/libintl.a files if we are on a
246 # system which has the GNU gettext() function in its C library or in a
247 # separate library.
248 # If you want to use the one which comes with this version of the
249 # package, you have to use `configure --with-included-gettext'.
250 install: install-exec install-data
251 install-exec: all
252         if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
253            && test '@USE_INCLUDED_LIBINTL@' = yes; then \
254           $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
255           $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
256           $(LIBTOOL) --mode=install \
257             $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
258           if test "@RELOCATABLE@" = yes; then \
259             dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
260             if test -n "$dependencies"; then \
261               rm -f $(DESTDIR)$(libdir)/libintl.la; \
262             fi; \
263           fi; \
264         else \
265           : ; \
266         fi
267         if test "$(PACKAGE)" = "gettext-tools" \
268            && test '@USE_INCLUDED_LIBINTL@' = no; then \
269           $(mkinstalldirs) $(DESTDIR)$(libdir); \
270           $(LIBTOOL) --mode=install \
271             $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
272           rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
273           $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
274           $(LIBTOOL) --mode=uninstall \
275             rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
276         else \
277           : ; \
278         fi
279         if test '@USE_INCLUDED_LIBINTL@' = yes; then \
280           $(mkinstalldirs) $(DESTDIR)$(localedir); \
281           test -f $(DESTDIR)$(localedir)/locale.alias \
282             && orig=$(DESTDIR)$(localedir)/locale.alias \
283             || orig=$(srcdir)/locale.alias; \
284           temp=$(DESTDIR)$(localedir)/t-locale.alias; \
285           dest=$(DESTDIR)$(localedir)/locale.alias; \
286           sed -f ref-add.sed $$orig > $$temp; \
287           $(INSTALL_DATA) $$temp $$dest; \
288           rm -f $$temp; \
289         else \
290           : ; \
291         fi
292 install-data: all
293         if test "$(PACKAGE)" = "gettext-tools"; then \
294           $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
295           $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
296           $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
297           dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
298           for file in $$dists; do \
299             $(INSTALL_DATA) $(srcdir)/$$file \
300                             $(DESTDIR)$(gettextsrcdir)/$$file; \
301           done; \
302           chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
303           dists="$(DISTFILES.generated)"; \
304           for file in $$dists; do \
305             if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
306             $(INSTALL_DATA) $$dir/$$file \
307                             $(DESTDIR)$(gettextsrcdir)/$$file; \
308           done; \
309           dists="$(DISTFILES.obsolete)"; \
310           for file in $$dists; do \
311             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
312           done; \
313         else \
314           : ; \
315         fi
316
317 install-strip: install
318
319 installdirs:
320         if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
321            && test '@USE_INCLUDED_LIBINTL@' = yes; then \
322           $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
323         else \
324           : ; \
325         fi
326         if test "$(PACKAGE)" = "gettext-tools" \
327            && test '@USE_INCLUDED_LIBINTL@' = no; then \
328           $(mkinstalldirs) $(DESTDIR)$(libdir); \
329         else \
330           : ; \
331         fi
332         if test '@USE_INCLUDED_LIBINTL@' = yes; then \
333           test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
334           $(mkinstalldirs) $(DESTDIR)$(localedir); \
335         else \
336           : ; \
337         fi
338         if test "$(PACKAGE)" = "gettext-tools"; then \
339           $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
340         else \
341           : ; \
342         fi
343
344 # Define this as empty until I found a useful application.
345 installcheck:
346
347 uninstall:
348         if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
349            && test '@USE_INCLUDED_LIBINTL@' = yes; then \
350           rm -f $(DESTDIR)$(includedir)/libintl.h; \
351           $(LIBTOOL) --mode=uninstall \
352             rm -f $(DESTDIR)$(libdir)/libintl.$la; \
353         else \
354           : ; \
355         fi
356         if test "$(PACKAGE)" = "gettext-tools" \
357            && test '@USE_INCLUDED_LIBINTL@' = no; then \
358           rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
359         else \
360           : ; \
361         fi
362         if test '@USE_INCLUDED_LIBINTL@' = yes; then \
363           if test -f $(DESTDIR)$(prefix)/libdata/charset.alias; then \
364             temp=$(DESTDIR)$(prefix)/libdata/t-charset.alias; \
365             dest=$(DESTDIR)$(prefix)/libdata/charset.alias; \
366             sed -f ref-del.sed $$dest > $$temp; \
367             if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
368               rm -f $$dest; \
369             else \
370               $(INSTALL_DATA) $$temp $$dest; \
371             fi; \
372             rm -f $$temp; \
373           fi; \
374           if test -f $(DESTDIR)$(localedir)/locale.alias; then \
375             temp=$(DESTDIR)$(localedir)/t-locale.alias; \
376             dest=$(DESTDIR)$(localedir)/locale.alias; \
377             sed -f ref-del.sed $$dest > $$temp; \
378             if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
379               rm -f $$dest; \
380             else \
381               $(INSTALL_DATA) $$temp $$dest; \
382             fi; \
383             rm -f $$temp; \
384           fi; \
385         else \
386           : ; \
387         fi
388         if test "$(PACKAGE)" = "gettext-tools"; then \
389           for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
390             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
391           done; \
392         else \
393           : ; \
394         fi
395
396 info dvi ps pdf html:
397
398 $(OBJECTS): ${top_builddir}/config.h libgnuintl.h
399 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: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
400 dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
401 explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
402 dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
403 dcigettext.$lo: $(srcdir)/eval-plural.h
404 localcharset.$lo: $(srcdir)/localcharset.h
405 localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
406
407 tags: TAGS
408
409 TAGS: $(HEADERS) $(SOURCES)
410         here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
411
412 ctags: CTAGS
413
414 CTAGS: $(HEADERS) $(SOURCES)
415         here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
416
417 id: ID
418
419 ID: $(HEADERS) $(SOURCES)
420         here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
421
422
423 mostlyclean:
424         rm -f *.a *.la *.o *.obj *.lo core core.*
425         rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
426         rm -f -r .libs _libs
427
428 clean: mostlyclean
429
430 distclean: clean
431         rm -f Makefile ID TAGS
432         if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
433           rm -f ChangeLog.inst $(DISTFILES.normal); \
434         else \
435           : ; \
436         fi
437
438 maintainer-clean: distclean
439         @echo "This command is intended for maintainers to use;"
440         @echo "it deletes files that may require special tools to rebuild."
441
442
443 # GNU gettext needs not contain the file `VERSION' but contains some
444 # other files which should not be distributed in other packages.
445 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
446 dist distdir: Makefile
447         if test "$(PACKAGE)" = "gettext-tools"; then \
448           : ; \
449         else \
450           if test "$(PACKAGE)" = "gettext-runtime"; then \
451             additional="$(DISTFILES.gettext)"; \
452           else \
453             additional="$(DISTFILES.normal)"; \
454           fi; \
455           $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
456           for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
457             if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
458             cp -p $$dir/$$file $(distdir); \
459           done; \
460         fi
461
462 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
463         cd $(top_builddir) && $(SHELL) ./config.status
464 # This would be more efficient, but doesn't work any more with autoconf-2.57,
465 # when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
466 #       cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
467
468 # Tell versions [3.59,3.63) of GNU make not to export all variables.
469 # Otherwise a system limit (for SysV at least) may be exceeded.
470 .NOEXPORT: