1 # Makefile for directory with message catalog handling library of GNU gettext
2 # Copyright (C) 1995-1998, 2000-2007, 2009-2015 Free Software
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.
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.
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/>.
24 top_srcdir = @top_srcdir@
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.
40 exec_prefix = @exec_prefix@
41 transform = @program_transform_name@
43 includedir = @includedir@
44 datarootdir = @datarootdir@
46 localedir = $(datadir)/locale
47 gettextsrcdir = $(datadir)/gettext/intl
48 aliaspath = $(localedir)
52 INSTALL_DATA = @INSTALL_DATA@
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@
66 l = @INTL_LIBTOOL_SUFFIX_PREFIX@
72 YACC = @INTLBISON@ -y -d
73 YFLAGS = --name-prefix=__gettext
74 # Windows resource compiler (windres). Used when libtool is not used.
76 # Windows resource compiler (windres). Used via libtool.
79 # Support for silent-rules.
80 AM_V_at = $(am__v_at_$(V))
81 am__v_at_ = $(am__v_at_@INTL_DEFAULT_VERBOSITY@)
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@)
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
114 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
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
130 tsearch.h tsearch.c \
133 printf-args.h printf-args.c \
134 printf-parse.h wprintf-parse.h printf-parse.c \
135 vasnprintf.h vasnwprintf.h vasnprintf.c \
202 OBJECTS_RES_yes = libintl.res.$lo
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
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
222 libintl.a libgnuintl.a: $(OBJECTS)
224 $(AM_V_AR)$(AR) cru $@ $(OBJECTS)
225 $(AM_V_at)$(RANLIB) $@
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) \
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.
246 .SUFFIXES: .c .y .o .lo .sin .sed
249 $(AM_V_CC)$(COMPILE) $<
252 $(AM_V_YACC)$(YACC) $(YFLAGS) --output $@ $<
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
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; \
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
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
358 INCLUDES = -I. -I$(srcdir) -I..
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;/'; \
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' \
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
387 charset.alias: $(srcdir)/config.charset
388 $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
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
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
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; \
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; \
428 if test '@USE_INCLUDED_LIBINTL@' = yes; then \
429 if test @GLIBC21@ = no; then \
430 case '@host_os@' in \
432 need_charset_alias=true ;; \
433 darwin* | cygwin* | mingw* | pw32* | cegcc*) \
434 need_charset_alias=false ;; \
436 need_charset_alias=true ;; \
439 need_charset_alias=false; \
441 if $$need_charset_alias; then \
442 $(mkdir_p) $(DESTDIR)$(libdir); \
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; \
452 if $$need_charset_alias; then \
453 orig=charset.alias; \
454 sed -f ref-add.sed $$orig > $$temp; \
455 $(INSTALL_DATA) $$temp $$dest; \
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; \
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; \
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; \
487 dists="$(DISTFILES.obsolete)"; \
488 for file in $$dists; do \
489 rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
495 install-strip: install
497 install-dvi install-html install-info install-ps install-pdf:
500 if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
501 && test '@USE_INCLUDED_LIBINTL@' = yes; then \
502 $(mkdir_p) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
506 if test "$(PACKAGE)" = "gettext-tools" \
507 && test '@USE_INCLUDED_LIBINTL@' = no \
508 && test @GLIBC2@ != no; then \
509 $(mkdir_p) $(DESTDIR)$(libdir); \
513 if test '@USE_INCLUDED_LIBINTL@' = yes; then \
514 if test @GLIBC21@ = no; then \
515 case '@host_os@' in \
517 need_charset_alias=true ;; \
518 darwin* | cygwin* | mingw* | pw32* | cegcc*) \
519 need_charset_alias=false ;; \
521 need_charset_alias=true ;; \
524 need_charset_alias=false; \
526 if $$need_charset_alias; then \
527 $(mkdir_p) $(DESTDIR)$(libdir); \
529 $(mkdir_p) $(DESTDIR)$(localedir); \
533 if test "$(PACKAGE)" = "gettext-tools"; then \
534 $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
539 # Define this as empty until I found a useful application.
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; \
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; \
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 \
566 $(INSTALL_DATA) $$temp $$dest; \
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 \
577 $(INSTALL_DATA) $$temp $$dest; \
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; \
592 info dvi ps pdf html:
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
606 # A bison-2.1 generated plural.c includes <libintl.h> if ENABLE_NLS.
607 PLURAL_DEPS_yes = libintl.h
609 $(PLURAL_OBJECT): $(PLURAL_DEPS_@USE_INCLUDED_LIBINTL@)
613 TAGS: $(HEADERS) $(SOURCES)
614 here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
618 CTAGS: $(HEADERS) $(SOURCES)
619 here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
623 ID: $(HEADERS) $(SOURCES)
624 here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
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
636 rm -f Makefile ID TAGS
637 if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
638 rm -f $(DISTFILES.normal); \
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."
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 \
655 if test "$(PACKAGE)" = "gettext-runtime"; then \
656 additional="$(DISTFILES.gettext)"; \
658 additional="$(DISTFILES.normal)"; \
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; \
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)/$@
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.