Imported Upstream version 0.19.8.1
[platform/upstream/gettext.git] / gettext-runtime / intl / Makefile.in
1 # Makefile for directory with message catalog handling library of GNU gettext
2 # Copyright (C) 1995-1998, 2000-2007, 2009-2016 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 Lesser General Public License as published by
6 # the Free Software Foundation; either version 2.1 of the License, or
7 # (at your option) 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 Lesser General Public License for more details.
13 #
14 # You should have received a copy of the GNU Lesser General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 PACKAGE = @PACKAGE@
18 VERSION = @VERSION@
19
20 SHELL = @SHELL@
21
22 srcdir = @srcdir@
23 top_srcdir = @top_srcdir@
24 top_builddir = ..
25
26 # The VPATH variables allows builds with $builddir != $srcdir, assuming a
27 # 'make' program that supports VPATH (such as GNU make). This line is removed
28 # by autoconf automatically when "$(srcdir)" = ".".
29 # In this directory, the VPATH handling is particular:
30 # 1. If INTL_LIBTOOL_SUFFIX_PREFIX is 'l' (indicating a build with libtool),
31 #    the .c -> .lo rules carefully use $(srcdir), so that VPATH can be omitted.
32 # 2. If PACKAGE = gettext-tools, VPATH _must_ be omitted, because otherwise
33 #    'make' does the wrong thing if GNU gettext was configured with
34 #    "./configure --srcdir=`pwd`", namely it gets confused by the .lo and .la
35 #    files it finds in srcdir = ../../gettext-runtime/intl.
36 VPATH = $(srcdir)
37
38 prefix = @prefix@
39 exec_prefix = @exec_prefix@
40 transform = @program_transform_name@
41 libdir = @libdir@
42 includedir = @includedir@
43 datarootdir = @datarootdir@
44 datadir = @datadir@
45 localedir = $(datadir)/locale
46 gettextsrcdir = $(datadir)/gettext/intl
47 aliaspath = $(localedir)
48 subdir = intl
49
50 INSTALL = @INSTALL@
51 INSTALL_DATA = @INSTALL_DATA@
52
53 # We use $(mkdir_p).
54 # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
55 # "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
56 # @install_sh@ does not start with $(SHELL), so we add it.
57 # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
58 # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
59 # versions, $(mkinstalldirs) and $(install_sh) are unused.
60 mkinstalldirs = $(SHELL) @install_sh@ -d
61 install_sh = $(SHELL) @install_sh@
62 MKDIR_P = @MKDIR_P@
63 mkdir_p = @mkdir_p@
64
65 l = @INTL_LIBTOOL_SUFFIX_PREFIX@
66
67 AR = ar
68 CC = @CC@
69 LIBTOOL = @LIBTOOL@
70 RANLIB = @RANLIB@
71 YACC = @INTLBISON@ -y -d
72 YFLAGS = --name-prefix=__gettext
73 # Windows resource compiler (windres). Used when libtool is not used.
74 WINDRES = @WINDRES@
75 # Windows resource compiler (windres). Used via libtool.
76 RC = @RC@
77
78 # Support for silent-rules.
79 AM_V_at = $(am__v_at_$(V))
80 am__v_at_ = $(am__v_at_@INTL_DEFAULT_VERBOSITY@)
81 am__v_at_0 = @
82 AM_V_AR = $(am__v_AR_$(V))
83 am__v_AR_ = $(am__v_AR_@INTL_DEFAULT_VERBOSITY@)
84 am__v_AR_0 = @echo "  AR    " $@;
85 AM_V_CC = $(am__v_CC_$(V))
86 am__v_CC_ = $(am__v_CC_@INTL_DEFAULT_VERBOSITY@)
87 am__v_CC_0 = @echo "  CC    " $@;
88 AM_V_GEN = $(am__v_GEN_$(V))
89 am__v_GEN_ = $(am__v_GEN_@INTL_DEFAULT_VERBOSITY@)
90 am__v_GEN_0 = @echo "  GEN   " $@;
91 AM_V_YACC = $(am__v_YACC_$(V))
92 am__v_YACC_ = $(am__v_YACC_@INTL_DEFAULT_VERBOSITY@)
93 am__v_YACC_0 = @echo "  YACC  " $@;
94 AM_V_lt = $(am__v_lt_$(V))
95 am__v_lt_ = $(am__v_lt_@INTL_DEFAULT_VERBOSITY@)
96 am__v_lt_0 = --silent
97
98 # -DBUILDING_LIBINTL: Change expansion of LIBINTL_DLL_EXPORTED macro.
99 # -DBUILDING_DLL: Change expansion of RELOCATABLE_DLL_EXPORTED macro.
100 DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
101 -DLIBDIR=\"$(libdir)\" -DBUILDING_LIBINTL -DBUILDING_DLL -DIN_LIBINTL \
102 -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
103 -Dset_relocation_prefix=libintl_set_relocation_prefix \
104 -Drelocate=libintl_relocate \
105 -DDEPENDS_ON_LIBICONV=1 @DEFS@
106 CPPFLAGS = @CPPFLAGS@
107 CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@
108 LDFLAGS = @LDFLAGS@ $(LDFLAGS_@WOE32DLL@)
109 LDFLAGS_yes = -Wl,--export-all-symbols
110 LDFLAGS_no =
111 LIBS = @LIBS@
112
113 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
114
115 # This line will be replaced with pluralx.$lo, when this file is used
116 # in gettext-tools/intl/.  See the pluralx.lo rule below for the rationale.
117 PLURAL_OBJECT = plural.$lo
118
119 HEADERS = \
120   gmo.h \
121   gettextP.h \
122   hash-string.h \
123   loadinfo.h \
124   plural-exp.h \
125   eval-plural.h \
126   localcharset.h \
127   lock.h \
128   relocatable.h \
129   tsearch.h tsearch.c \
130   verify.h \
131   xsize.h \
132   printf-args.h printf-args.c \
133   printf-parse.h wprintf-parse.h printf-parse.c \
134   vasnprintf.h vasnwprintf.h vasnprintf.c \
135   os2compat.h \
136   libgnuintl.in.h
137 SOURCES = \
138   bindtextdom.c \
139   dcgettext.c \
140   dgettext.c \
141   gettext.c \
142   finddomain.c \
143   hash-string.c \
144   loadmsgcat.c \
145   localealias.c \
146   textdomain.c \
147   l10nflist.c \
148   explodename.c \
149   dcigettext.c \
150   dcngettext.c \
151   dngettext.c \
152   ngettext.c \
153   plural.y \
154   plural-exp.c \
155   localcharset.c \
156   threadlib.c \
157   lock.c \
158   relocatable.c \
159   langprefs.c \
160   localename.c \
161   log.c \
162   printf.c \
163   setlocale.c \
164   version.c \
165   xsize.c \
166   osdep.c \
167   os2compat.c \
168   intl-exports.c \
169   intl-compat.c
170 OBJECTS = \
171   bindtextdom.$lo \
172   dcgettext.$lo \
173   dgettext.$lo \
174   gettext.$lo \
175   finddomain.$lo \
176   hash-string.$lo \
177   loadmsgcat.$lo \
178   localealias.$lo \
179   textdomain.$lo \
180   l10nflist.$lo \
181   explodename.$lo \
182   dcigettext.$lo \
183   dcngettext.$lo \
184   dngettext.$lo \
185   ngettext.$lo \
186   $(PLURAL_OBJECT) \
187   plural-exp.$lo \
188   localcharset.$lo \
189   threadlib.$lo \
190   lock.$lo \
191   relocatable.$lo \
192   langprefs.$lo \
193   localename.$lo \
194   log.$lo \
195   printf.$lo \
196   setlocale.$lo \
197   version.$lo \
198   xsize.$lo \
199   osdep.$lo \
200   intl-compat.$lo
201 OBJECTS_RES_yes = libintl.res.$lo
202 OBJECTS_RES_no =
203 DISTFILES.common = Makefile.in \
204 config.charset locale.alias ref-add.sin ref-del.sin export.h libintl.rc \
205 $(HEADERS) $(SOURCES)
206 DISTFILES.generated = plural.c
207 DISTFILES.normal = VERSION
208 DISTFILES.gettext = ChangeLog COPYING.LIB libintl.glibc README.woe32
209 DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
210 COPYING.LIB-2 COPYING.LIB-2.0 COPYING.LIB-2.1 \
211 gettext.h libgettext.h plural-eval.c libgnuintl.h \
212 libgnuintl.h_vms Makefile.vms libgnuintl.h.msvc-static \
213 libgnuintl.h.msvc-shared Makefile.msvc
214
215 all: all-@USE_INCLUDED_LIBINTL@
216 all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
217 all-no: all-no-@BUILD_INCLUDED_LIBINTL@
218 all-no-yes: libgnuintl.$la
219 all-no-no:
220
221 libintl.a libgnuintl.a: $(OBJECTS)
222         $(AM_V_at)rm -f $@
223         $(AM_V_AR)$(AR) cru $@ $(OBJECTS)
224         $(AM_V_at)$(RANLIB) $@
225
226 libintl.la libgnuintl.la: $(OBJECTS) $(OBJECTS_RES_@WOE32@)
227         $(AM_V_GEN)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \
228           $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
229           $(OBJECTS) @LTLIBICONV@ @INTL_MACOSX_LIBS@ $(LIBS) @LTLIBTHREAD@ @LTLIBC@ \
230           $(OBJECTS_RES_@WOE32@) \
231           -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
232           -rpath $(libdir) \
233           -no-undefined
234
235 # Libtool's library version information for libintl.
236 # Before making a gettext release, the gettext maintainer must change this
237 # according to the libtool documentation, section "Library interface versions".
238 # Maintainers of other packages that include the intl directory must *not*
239 # change these values.
240 LTV_CURRENT=9
241 LTV_REVISION=5
242 LTV_AGE=1
243
244 .SUFFIXES:
245 .SUFFIXES: .c .y .o .lo .sin .sed
246
247 .c.o:
248         $(AM_V_CC)$(COMPILE) $<
249
250 .y.c:
251         $(AM_V_YACC)$(YACC) $(YFLAGS) --output $@ $<
252         $(AM_V_at)rm -f $*.h
253
254 bindtextdom.lo: $(srcdir)/bindtextdom.c
255         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
256 dcgettext.lo: $(srcdir)/dcgettext.c
257         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
258 dgettext.lo: $(srcdir)/dgettext.c
259         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/dgettext.c
260 gettext.lo: $(srcdir)/gettext.c
261         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/gettext.c
262 finddomain.lo: $(srcdir)/finddomain.c
263         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/finddomain.c
264 hash-string.lo: $(srcdir)/hash-string.c
265         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/hash-string.c
266 loadmsgcat.lo: $(srcdir)/loadmsgcat.c
267         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
268 localealias.lo: $(srcdir)/localealias.c
269         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/localealias.c
270 textdomain.lo: $(srcdir)/textdomain.c
271         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/textdomain.c
272 l10nflist.lo: $(srcdir)/l10nflist.c
273         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
274 explodename.lo: $(srcdir)/explodename.c
275         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/explodename.c
276 dcigettext.lo: $(srcdir)/dcigettext.c
277         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
278 dcngettext.lo: $(srcdir)/dcngettext.c
279         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
280 dngettext.lo: $(srcdir)/dngettext.c
281         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/dngettext.c
282 ngettext.lo: $(srcdir)/ngettext.c
283         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/ngettext.c
284 plural.lo: $(srcdir)/plural.c
285         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/plural.c
286 # $(srcdir)/plural.c contains a relative file name of the Bison source.
287 # That could mess up LCOV when the C source file is referred to from a
288 # different base directory.
289 pluralx.c: $(srcdir)/plural.c
290         $(AM_V_GEN)sed -e 's|^#line \([0-9]*\) "\(plural\.[cy]\)"|#line \1 "$(srcdir)/\2"|' < $(srcdir)/plural.c > $@
291 pluralx.lo: pluralx.c
292         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) pluralx.c
293 plural-exp.lo: $(srcdir)/plural-exp.c
294         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
295 localcharset.lo: $(srcdir)/localcharset.c
296         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/localcharset.c
297 threadlib.lo: $(srcdir)/threadlib.c
298         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/threadlib.c
299 lock.lo: $(srcdir)/lock.c
300         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/lock.c
301 relocatable.lo: $(srcdir)/relocatable.c
302         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/relocatable.c
303 langprefs.lo: $(srcdir)/langprefs.c
304         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/langprefs.c
305 localename.lo: $(srcdir)/localename.c
306         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/localename.c
307 log.lo: $(srcdir)/log.c
308         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/log.c
309 printf.lo: $(srcdir)/printf.c
310         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/printf.c
311 setlocale.lo: $(srcdir)/setlocale.c
312         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/setlocale.c
313 version.lo: $(srcdir)/version.c
314         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/version.c
315 xsize.lo: $(srcdir)/xsize.c
316         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/xsize.c
317 osdep.lo: $(srcdir)/osdep.c
318         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/osdep.c
319 intl-compat.lo: $(srcdir)/intl-compat.c
320         $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
321
322 # This rule is executed only on Woe32 systems.
323 # The following sed expressions come from the windres-options script. They are
324 # inlined here, so that they can be written in a Makefile without requiring a
325 # temporary file. They must contain literal newlines rather than semicolons,
326 # so that they work with the sed-3.02 that is shipped with MSYS.
327 libintl.res.o: $(srcdir)/libintl.rc
328         nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
329         sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
330         sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
331         sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
332         $(WINDRES) \
333           "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \
334           "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \
335           "-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \
336           "-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \
337           -i $(srcdir)/libintl.rc -o libintl.res.o --output-format=coff
338 libintl.res.lo: $(srcdir)/libintl.rc
339         nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
340         sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
341         sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
342         sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \
343         $(LIBTOOL) --mode=compile --tag=RC $(RC) \
344           "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \
345           "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \
346           "-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \
347           "-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \
348           -i $(srcdir)/libintl.rc -o libintl.res.lo --output-format=coff
349
350 ref-add.sed: $(srcdir)/ref-add.sin
351         sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
352         mv t-ref-add.sed ref-add.sed
353 ref-del.sed: $(srcdir)/ref-del.sin
354         sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
355         mv t-ref-del.sed ref-del.sed
356
357 INCLUDES = -I. -I$(srcdir) -I..
358
359 libgnuintl.h: $(srcdir)/libgnuintl.in.h
360         sed -e '/IN_LIBGLOCALE/d' \
361             -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
362             -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
363             -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
364             -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
365             -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
366           < $(srcdir)/libgnuintl.in.h \
367         | if test '@WOE32DLL@' = yes; then \
368             sed -e 's/extern \([^()]*\);/extern __declspec (dllimport) \1;/'; \
369           else \
370             cat; \
371           fi \
372         | sed -e 's/extern \([^"]\)/extern LIBINTL_DLL_EXPORTED \1/' \
373               -e "/#define _LIBINTL_H/r $(srcdir)/export.h" \
374         | sed -e 's,@''HAVE_VISIBILITY''@,@HAVE_VISIBILITY@,g' \
375           > libgnuintl.h
376
377 libintl.h: $(srcdir)/libgnuintl.in.h
378         sed -e '/IN_LIBGLOCALE/d' \
379             -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
380             -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
381             -e 's,@''HAVE_NEWLOCALE''@,@HAVE_NEWLOCALE@,g' \
382             -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
383             -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
384           < $(srcdir)/libgnuintl.in.h > libintl.h
385
386 charset.alias: $(srcdir)/config.charset
387         $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
388         mv t-$@ $@
389
390 check: all
391
392 # We must not install the libintl.h/libintl.a files if we are on a
393 # system which has the GNU gettext() function in its C library or in a
394 # separate library.
395 # If you want to use the one which comes with this version of the
396 # package, you have to use "configure --with-included-gettext".
397 install: install-exec install-data
398 install-exec: all
399         if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
400            && test '@USE_INCLUDED_LIBINTL@' = yes; then \
401           $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
402           $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
403           $(LIBTOOL) --mode=install \
404             $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
405           if test "@RELOCATABLE@" = yes; then \
406             dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
407             if test -n "$$dependencies"; then \
408               rm -f $(DESTDIR)$(libdir)/libintl.la; \
409             fi; \
410           fi; \
411         else \
412           : ; \
413         fi
414         if test "$(PACKAGE)" = "gettext-tools" \
415            && test '@USE_INCLUDED_LIBINTL@' = no \
416            && test @GLIBC2@ != no; then \
417           $(mkdir_p) $(DESTDIR)$(libdir); \
418           $(LIBTOOL) --mode=install \
419             $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
420           rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
421           $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
422           $(LIBTOOL) --mode=uninstall \
423             rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
424         else \
425           : ; \
426         fi
427         if test '@USE_INCLUDED_LIBINTL@' = yes; then \
428           if test @GLIBC21@ = no; then \
429             case '@host_os@' in \
430               darwin[56]*) \
431                 need_charset_alias=true ;; \
432               darwin* | cygwin* | mingw* | pw32* | cegcc*) \
433                 need_charset_alias=false ;; \
434               *) \
435                 need_charset_alias=true ;; \
436             esac; \
437           else \
438             need_charset_alias=false; \
439           fi; \
440           if $$need_charset_alias; then \
441             $(mkdir_p) $(DESTDIR)$(libdir); \
442           fi; \
443           temp=$(DESTDIR)$(libdir)/t-charset.alias; \
444           dest=$(DESTDIR)$(libdir)/charset.alias; \
445           if test -f $(DESTDIR)$(libdir)/charset.alias; then \
446             orig=$(DESTDIR)$(libdir)/charset.alias; \
447             sed -f ref-add.sed $$orig > $$temp; \
448             $(INSTALL_DATA) $$temp $$dest; \
449             rm -f $$temp; \
450           else \
451             if $$need_charset_alias; then \
452               orig=charset.alias; \
453               sed -f ref-add.sed $$orig > $$temp; \
454               $(INSTALL_DATA) $$temp $$dest; \
455               rm -f $$temp; \
456             fi; \
457           fi; \
458           $(mkdir_p) $(DESTDIR)$(localedir); \
459           test -f $(DESTDIR)$(localedir)/locale.alias \
460             && orig=$(DESTDIR)$(localedir)/locale.alias \
461             || orig=$(srcdir)/locale.alias; \
462           temp=$(DESTDIR)$(localedir)/t-locale.alias; \
463           dest=$(DESTDIR)$(localedir)/locale.alias; \
464           sed -f ref-add.sed $$orig > $$temp; \
465           $(INSTALL_DATA) $$temp $$dest; \
466           rm -f $$temp; \
467         else \
468           : ; \
469         fi
470 install-data: all
471         if test "$(PACKAGE)" = "gettext-tools"; then \
472           $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
473           $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
474           dists="COPYING.LIB $(DISTFILES.common)"; \
475           for file in $$dists; do \
476             $(INSTALL_DATA) $(srcdir)/$$file \
477                             $(DESTDIR)$(gettextsrcdir)/$$file; \
478           done; \
479           chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
480           dists="$(DISTFILES.generated)"; \
481           for file in $$dists; do \
482             if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
483             $(INSTALL_DATA) $$dir/$$file \
484                             $(DESTDIR)$(gettextsrcdir)/$$file; \
485           done; \
486           dists="$(DISTFILES.obsolete)"; \
487           for file in $$dists; do \
488             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
489           done; \
490         else \
491           : ; \
492         fi
493
494 install-strip: install
495
496 install-dvi install-html install-info install-ps install-pdf:
497
498 installdirs:
499         if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
500            && test '@USE_INCLUDED_LIBINTL@' = yes; then \
501           $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
502         else \
503           : ; \
504         fi
505         if test "$(PACKAGE)" = "gettext-tools" \
506            && test '@USE_INCLUDED_LIBINTL@' = no \
507            && test @GLIBC2@ != no; then \
508           $(mkdir_p) $(DESTDIR)$(libdir); \
509         else \
510           : ; \
511         fi
512         if test '@USE_INCLUDED_LIBINTL@' = yes; then \
513           if test @GLIBC21@ = no; then \
514             case '@host_os@' in \
515               darwin[56]*) \
516                 need_charset_alias=true ;; \
517               darwin* | cygwin* | mingw* | pw32* | cegcc*) \
518                 need_charset_alias=false ;; \
519               *) \
520                 need_charset_alias=true ;; \
521             esac; \
522           else \
523             need_charset_alias=false; \
524           fi; \
525           if $$need_charset_alias; then \
526             $(mkdir_p) $(DESTDIR)$(libdir); \
527           fi; \
528           $(mkdir_p) $(DESTDIR)$(localedir); \
529         else \
530           : ; \
531         fi
532         if test "$(PACKAGE)" = "gettext-tools"; then \
533           $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
534         else \
535           : ; \
536         fi
537
538 # Define this as empty until I found a useful application.
539 installcheck:
540
541 uninstall:
542         if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
543            && test '@USE_INCLUDED_LIBINTL@' = yes; then \
544           rm -f $(DESTDIR)$(includedir)/libintl.h; \
545           $(LIBTOOL) --mode=uninstall \
546             rm -f $(DESTDIR)$(libdir)/libintl.$la; \
547         else \
548           : ; \
549         fi
550         if test "$(PACKAGE)" = "gettext-tools" \
551            && test '@USE_INCLUDED_LIBINTL@' = no \
552            && test @GLIBC2@ != no; then \
553           rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
554         else \
555           : ; \
556         fi
557         if test '@USE_INCLUDED_LIBINTL@' = yes; then \
558           if test -f $(DESTDIR)$(libdir)/charset.alias; then \
559             temp=$(DESTDIR)$(libdir)/t-charset.alias; \
560             dest=$(DESTDIR)$(libdir)/charset.alias; \
561             sed -f ref-del.sed $$dest > $$temp; \
562             if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
563               rm -f $$dest; \
564             else \
565               $(INSTALL_DATA) $$temp $$dest; \
566             fi; \
567             rm -f $$temp; \
568           fi; \
569           if test -f $(DESTDIR)$(localedir)/locale.alias; then \
570             temp=$(DESTDIR)$(localedir)/t-locale.alias; \
571             dest=$(DESTDIR)$(localedir)/locale.alias; \
572             sed -f ref-del.sed $$dest > $$temp; \
573             if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
574               rm -f $$dest; \
575             else \
576               $(INSTALL_DATA) $$temp $$dest; \
577             fi; \
578             rm -f $$temp; \
579           fi; \
580         else \
581           : ; \
582         fi
583         if test "$(PACKAGE)" = "gettext-tools"; then \
584           for file in VERSION COPYING.LIB $(DISTFILES.common) $(DISTFILES.generated); do \
585             rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
586           done; \
587         else \
588           : ; \
589         fi
590
591 info dvi ps pdf html:
592
593 $(OBJECTS): ../config.h libgnuintl.h
594 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 setlocale.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
595 localename.$lo: $(srcdir)/gettextP.h
596 hash-string.$lo dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
597 explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
598 dcigettext.$lo loadmsgcat.$lo $(PLURAL_OBJECT) plural-exp.$lo: $(srcdir)/plural-exp.h
599 dcigettext.$lo: $(srcdir)/eval-plural.h
600 localcharset.$lo: $(srcdir)/localcharset.h
601 bindtextdom.$lo dcigettext.$lo finddomain.$lo loadmsgcat.$lo localealias.$lo lock.$lo log.$lo: $(srcdir)/lock.h
602 localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
603 printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/xsize.c $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c
604
605 # A bison-2.1 generated plural.c includes <libintl.h> if ENABLE_NLS.
606 PLURAL_DEPS_yes = libintl.h
607 PLURAL_DEPS_no =
608 $(PLURAL_OBJECT): $(PLURAL_DEPS_@USE_INCLUDED_LIBINTL@)
609
610 tags: TAGS
611
612 TAGS: $(HEADERS) $(SOURCES)
613         here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
614
615 ctags: CTAGS
616
617 CTAGS: $(HEADERS) $(SOURCES)
618         here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
619
620 id: ID
621
622 ID: $(HEADERS) $(SOURCES)
623         here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
624
625
626 mostlyclean:
627         rm -f *.a *.la *.o *.obj *.lo core core.*
628         rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
629         rm -f -r .libs _libs
630         rm -f pluralx.c
631
632 clean: mostlyclean
633
634 distclean: clean
635         rm -f Makefile ID TAGS
636         if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
637           rm -f $(DISTFILES.normal); \
638         else \
639           : ; \
640         fi
641
642 maintainer-clean: distclean
643         @echo "This command is intended for maintainers to use;"
644         @echo "it deletes files that may require special tools to rebuild."
645
646
647 # GNU gettext needs not contain the file 'VERSION' but contains some
648 # other files which should not be distributed in other packages.
649 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
650 dist distdir: Makefile
651         if test "$(PACKAGE)" = "gettext-tools"; then \
652           : ; \
653         else \
654           if test "$(PACKAGE)" = "gettext-runtime"; then \
655             additional="$(DISTFILES.gettext)"; \
656           else \
657             additional="$(DISTFILES.normal)"; \
658           fi; \
659           $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
660           for file in $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
661             if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
662             cp -p $$dir/$$file $(distdir) || test $$file = Makefile.in || exit 1; \
663           done; \
664         fi
665
666 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
667         cd $(top_builddir) && $(SHELL) ./config.status
668 # This would be more efficient, but doesn't work any more with autoconf-2.57,
669 # when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
670 #       cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
671
672 # Tell versions [3.59,3.63) of GNU make not to export all variables.
673 # Otherwise a system limit (for SysV at least) may be exceeded.
674 .NOEXPORT: