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.
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.
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.
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/>.
23 top_srcdir = @top_srcdir@
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.
39 exec_prefix = @exec_prefix@
40 transform = @program_transform_name@
42 includedir = @includedir@
43 datarootdir = @datarootdir@
45 localedir = $(datadir)/locale
46 gettextsrcdir = $(datadir)/gettext/intl
47 aliaspath = $(localedir)
51 INSTALL_DATA = @INSTALL_DATA@
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@
65 l = @INTL_LIBTOOL_SUFFIX_PREFIX@
71 YACC = @INTLBISON@ -y -d
72 YFLAGS = --name-prefix=__gettext
73 # Windows resource compiler (windres). Used when libtool is not used.
75 # Windows resource compiler (windres). Used via libtool.
78 # Support for silent-rules.
79 AM_V_at = $(am__v_at_$(V))
80 am__v_at_ = $(am__v_at_@INTL_DEFAULT_VERBOSITY@)
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@)
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
113 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
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
129 tsearch.h tsearch.c \
132 printf-args.h printf-args.c \
133 printf-parse.h wprintf-parse.h printf-parse.c \
134 vasnprintf.h vasnwprintf.h vasnprintf.c \
201 OBJECTS_RES_yes = libintl.res.$lo
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
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
221 libintl.a libgnuintl.a: $(OBJECTS)
223 $(AM_V_AR)$(AR) cru $@ $(OBJECTS)
224 $(AM_V_at)$(RANLIB) $@
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) \
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.
245 .SUFFIXES: .c .y .o .lo .sin .sed
248 $(AM_V_CC)$(COMPILE) $<
251 $(AM_V_YACC)$(YACC) $(YFLAGS) --output $@ $<
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
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; \
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
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
357 INCLUDES = -I. -I$(srcdir) -I..
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;/'; \
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' \
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
386 charset.alias: $(srcdir)/config.charset
387 $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
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
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
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; \
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; \
427 if test '@USE_INCLUDED_LIBINTL@' = yes; then \
428 if test @GLIBC21@ = no; then \
429 case '@host_os@' in \
431 need_charset_alias=true ;; \
432 darwin* | cygwin* | mingw* | pw32* | cegcc*) \
433 need_charset_alias=false ;; \
435 need_charset_alias=true ;; \
438 need_charset_alias=false; \
440 if $$need_charset_alias; then \
441 $(mkdir_p) $(DESTDIR)$(libdir); \
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; \
451 if $$need_charset_alias; then \
452 orig=charset.alias; \
453 sed -f ref-add.sed $$orig > $$temp; \
454 $(INSTALL_DATA) $$temp $$dest; \
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; \
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; \
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; \
486 dists="$(DISTFILES.obsolete)"; \
487 for file in $$dists; do \
488 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
494 install-strip: install
496 install-dvi install-html install-info install-ps install-pdf:
499 if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
500 && test '@USE_INCLUDED_LIBINTL@' = yes; then \
501 $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
505 if test "$(PACKAGE)" = "gettext-tools" \
506 && test '@USE_INCLUDED_LIBINTL@' = no \
507 && test @GLIBC2@ != no; then \
508 $(mkdir_p) $(DESTDIR)$(libdir); \
512 if test '@USE_INCLUDED_LIBINTL@' = yes; then \
513 if test @GLIBC21@ = no; then \
514 case '@host_os@' in \
516 need_charset_alias=true ;; \
517 darwin* | cygwin* | mingw* | pw32* | cegcc*) \
518 need_charset_alias=false ;; \
520 need_charset_alias=true ;; \
523 need_charset_alias=false; \
525 if $$need_charset_alias; then \
526 $(mkdir_p) $(DESTDIR)$(libdir); \
528 $(mkdir_p) $(DESTDIR)$(localedir); \
532 if test "$(PACKAGE)" = "gettext-tools"; then \
533 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
538 # Define this as empty until I found a useful application.
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; \
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; \
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 \
565 $(INSTALL_DATA) $$temp $$dest; \
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 \
576 $(INSTALL_DATA) $$temp $$dest; \
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; \
591 info dvi ps pdf html:
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
605 # A bison-2.1 generated plural.c includes <libintl.h> if ENABLE_NLS.
606 PLURAL_DEPS_yes = libintl.h
608 $(PLURAL_OBJECT): $(PLURAL_DEPS_@USE_INCLUDED_LIBINTL@)
612 TAGS: $(HEADERS) $(SOURCES)
613 here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
617 CTAGS: $(HEADERS) $(SOURCES)
618 here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
622 ID: $(HEADERS) $(SOURCES)
623 here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
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
635 rm -f Makefile ID TAGS
636 if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
637 rm -f $(DISTFILES.normal); \
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."
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 \
654 if test "$(PACKAGE)" = "gettext-runtime"; then \
655 additional="$(DISTFILES.gettext)"; \
657 additional="$(DISTFILES.normal)"; \
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; \
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)/$@
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.