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