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