• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Makefile for directory with message catalog handling library of GNU gettext
2# Copyright (C) 1995-1998, 2000-2003 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17# USA.
18
19PACKAGE = @PACKAGE@
20VERSION = @VERSION@
21
22SHELL = /bin/sh
23
24srcdir = @srcdir@
25top_srcdir = @top_srcdir@
26top_builddir = ..
27VPATH = $(srcdir)
28
29prefix = @prefix@
30exec_prefix = @exec_prefix@
31datarootdir = @datarootdir@
32transform = @program_transform_name@
33libdir = @libdir@
34includedir = @includedir@
35datadir = @datadir@
36localedir = $(datadir)/locale
37gettextsrcdir = $(datadir)/gettext/intl
38aliaspath = $(localedir)
39subdir = intl
40
41INSTALL = @INSTALL@
42INSTALL_DATA = @INSTALL_DATA@
43MKINSTALLDIRS = @MKINSTALLDIRS@
44mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
45
46@SET_MAKE@
47
48@ifGNUmake@ V =
49@ifGNUmake@ ifeq ($(strip $(V)),)
50@ifGNUmake@ #  E = @echo
51@ifGNUmake@ #  Q = @
52@ifGNUmake@    E = @E@
53@ifGNUmake@    Q = @Q@
54@ifGNUmake@ else
55@ifGNUmake@    E = @\#
56@ifGNUmake@    Q =
57@ifGNUmake@ endif
58
59@ifNotGNUmake@ E = @E@
60@ifNotGNUmake@ Q = @Q@
61
62@ifGNUmake@ CHECK=sparse
63@ifGNUmake@ CHECK_OPTS=-Wsparse-all -Wno-transparent-union -Wno-return-void -Wno-undef -Wno-non-pointer-null
64@ifGNUmake@ CPPCHECK=cppcheck
65@ifGNUmake@ CPPCHECK_OPTS=--force --enable=all --quiet --check-config
66@ifGNUmake@ ifeq ("$(C)", "2")
67@ifGNUmake@   CHECK_CMD=$(CHECK) $(CHECK_OPTS) -Wbitwise -D__CHECK_ENDIAN__
68@ifGNUmake@   CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS)
69@ifGNUmake@ else
70@ifGNUmake@   ifeq ("$(C)", "1")
71@ifGNUmake@     CHECK_CMD=$(CHECK) $(CHECK_OPTS)
72@ifGNUmake@     CPPCHECK_CMD=$(CPPCHECK) $(CPPCHECK_OPTS)
73@ifGNUmake@    else
74@ifGNUmake@     CHECK_CMD=@true
75@ifGNUmake@     CPPCHECK_CMD=@true
76@ifGNUmake@   endif
77@ifGNUmake@ endif
78
79@ifNotGNUmake@ CHECK_CMD=@true
80@ifNotGNUmake@ CPPCHECK_CMD=@true
81
82l = @INTL_LIBTOOL_SUFFIX_PREFIX@
83
84AR = ar
85CC = @CC@
86LIBTOOL = @LIBTOOL@
87RANLIB = @RANLIB@
88YACC = @INTLBISON@ -y -d
89YFLAGS = --name-prefix=__gettext
90
91DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
92-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \
93-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
94-Dset_relocation_prefix=libintl_set_relocation_prefix \
95-Drelocate=libintl_relocate \
96-DDEPENDS_ON_LIBICONV=1 -DHAVE_CONFIG_H
97CPPFLAGS = @CPPFLAGS@
98CFLAGS = @CFLAGS@
99LDFLAGS = @LDFLAGS@
100LIBS = @LIBS@
101
102COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
103
104HEADERS = \
105  gmo.h \
106  gettextP.h \
107  hash-string.h \
108  loadinfo.h \
109  plural-exp.h \
110  eval-plural.h \
111  localcharset.h \
112  relocatable.h \
113  xsize.h \
114  printf-args.h printf-args.c \
115  printf-parse.h wprintf-parse.h printf-parse.c \
116  vasnprintf.h vasnwprintf.h vasnprintf.c \
117  os2compat.h \
118  libgnuintl.h.in
119SOURCES = \
120  bindtextdom.c \
121  dcgettext.c \
122  dgettext.c \
123  gettext.c \
124  finddomain.c \
125  loadmsgcat.c \
126  localealias.c \
127  textdomain.c \
128  l10nflist.c \
129  explodename.c \
130  dcigettext.c \
131  dcngettext.c \
132  dngettext.c \
133  ngettext.c \
134  plural.y \
135  plural-exp.c \
136  localcharset.c \
137  relocatable.c \
138  localename.c \
139  log.c \
140  printf.c \
141  osdep.c \
142  os2compat.c \
143  intl-compat.c
144OBJECTS = \
145  bindtextdom.$lo \
146  dcgettext.$lo \
147  dgettext.$lo \
148  gettext.$lo \
149  finddomain.$lo \
150  loadmsgcat.$lo \
151  localealias.$lo \
152  textdomain.$lo \
153  l10nflist.$lo \
154  explodename.$lo \
155  dcigettext.$lo \
156  dcngettext.$lo \
157  dngettext.$lo \
158  ngettext.$lo \
159  plural.$lo \
160  plural-exp.$lo \
161  localcharset.$lo \
162  relocatable.$lo \
163  localename.$lo \
164  log.$lo \
165  printf.$lo \
166  osdep.$lo \
167  intl-compat.$lo
168DISTFILES.common = Makefile.in \
169config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
170DISTFILES.generated = plural.c
171DISTFILES.normal = VERSION
172DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
173libgnuintl.h_vms Makefile.vms \
174libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
175DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
176COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
177
178all: all-@USE_INCLUDED_LIBINTL@
179all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
180all-no: all-no-@BUILD_INCLUDED_LIBINTL@
181all-no-yes: libgnuintl.$la
182all-no-no:
183
184libintl.a libgnuintl.a: $(OBJECTS)
185	$(Q) rm -f $@
186	$(E) "	AR $@"
187	$(Q) $(AR) cru $@ $(OBJECTS)
188	$(E) "	RANLIB $@"
189	$(Q) $(RANLIB) $@
190
191libintl.la libgnuintl.la: $(OBJECTS)
192	$(LIBTOOL) --mode=link \
193	  $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
194	  $(OBJECTS) @LTLIBICONV@ $(LIBS) -lc \
195	  -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
196	  -rpath $(libdir) \
197	  -no-undefined
198
199# Libtool's library version information for libintl.
200# Before making a gettext release, the gettext maintainer must change this
201# according to the libtool documentation, section "Library interface versions".
202# Maintainers of other packages that include the intl directory must *not*
203# change these values.
204LTV_CURRENT=7
205LTV_REVISION=0
206LTV_AGE=4
207
208.SUFFIXES:
209.SUFFIXES: .c .y .o .lo .sin .sed
210
211.c.o:
212	$(E) "	CC $<"
213	$(Q) $(COMPILE) $<
214	$(Q) $(CHECK_CMD) $(ALL_CFLAGS) $<
215	$(Q) $(CPPCHECK_CMD) $(CPPFLAGS) $<
216
217.y.c:
218	$(YACC) $(YFLAGS) --output $@ $<
219	rm -f $*.h
220
221bindtextdom.lo: $(srcdir)/bindtextdom.c
222	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
223dcgettext.lo: $(srcdir)/dcgettext.c
224	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
225dgettext.lo: $(srcdir)/dgettext.c
226	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
227gettext.lo: $(srcdir)/gettext.c
228	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
229finddomain.lo: $(srcdir)/finddomain.c
230	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
231loadmsgcat.lo: $(srcdir)/loadmsgcat.c
232	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
233localealias.lo: $(srcdir)/localealias.c
234	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
235textdomain.lo: $(srcdir)/textdomain.c
236	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
237l10nflist.lo: $(srcdir)/l10nflist.c
238	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
239explodename.lo: $(srcdir)/explodename.c
240	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
241dcigettext.lo: $(srcdir)/dcigettext.c
242	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
243dcngettext.lo: $(srcdir)/dcngettext.c
244	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
245dngettext.lo: $(srcdir)/dngettext.c
246	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
247ngettext.lo: $(srcdir)/ngettext.c
248	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
249plural.lo: $(srcdir)/plural.c
250	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
251plural-exp.lo: $(srcdir)/plural-exp.c
252	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
253localcharset.lo: $(srcdir)/localcharset.c
254	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
255relocatable.lo: $(srcdir)/relocatable.c
256	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
257localename.lo: $(srcdir)/localename.c
258	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
259log.lo: $(srcdir)/log.c
260	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
261printf.lo: $(srcdir)/printf.c
262	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c
263osdep.lo: $(srcdir)/osdep.c
264	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
265intl-compat.lo: $(srcdir)/intl-compat.c
266	$(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
267
268ref-add.sed: $(srcdir)/ref-add.sin
269	$(E) "	SED ref-add.sed"
270	$(Q) sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
271	$(Q) mv t-ref-add.sed ref-add.sed
272ref-del.sed: $(srcdir)/ref-del.sin
273	$(E) "	SED ref-del.sed"
274	$(Q) sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
275	$(Q) mv t-ref-del.sed ref-del.sed
276
277INCLUDES = -I. -I$(srcdir) -I.. -I$(top_builddir)/lib
278
279libgnuintl.h: $(srcdir)/libgnuintl.h.in
280	$(E) "	SED libgnuintl.h "
281	$(Q) sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
282	    -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
283	    -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
284	    -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
285	  < $(srcdir)/libgnuintl.h.in > libgnuintl.h
286
287libintl.h: libgnuintl.h
288	$(E) "	CP libintl.h"
289	$(Q) cp libgnuintl.h libintl.h
290
291charset.alias: $(srcdir)/config.charset
292	$(E) "	CONFIG.CHARSET $@"
293	$(Q) $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
294	$(Q) mv t-$@ $@
295
296check: all
297
298# We must not install the libintl.h/libintl.a files if we are on a
299# system which has the GNU gettext() function in its C library or in a
300# separate library.
301# If you want to use the one which comes with this version of the
302# package, you have to use `configure --with-included-gettext'.
303install: install-exec install-data
304install-exec: all
305	$(Q) if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
306	   && test '@USE_INCLUDED_LIBINTL@' = yes; then \
307	  $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
308	  $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
309	  $(LIBTOOL) --mode=install \
310	    $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
311	  if test "@RELOCATABLE@" = yes; then \
312	    dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
313	    if test -n "$$dependencies"; then \
314	      rm -f $(DESTDIR)$(libdir)/libintl.la; \
315	    fi; \
316	  fi; \
317	else \
318	  : ; \
319	fi
320	$(Q) if test "$(PACKAGE)" = "gettext-tools" \
321	   && test '@USE_INCLUDED_LIBINTL@' = no; then \
322	  $(mkinstalldirs) $(DESTDIR)$(libdir); \
323	  $(LIBTOOL) --mode=install \
324	    $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
325	  rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
326	  $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
327	  $(LIBTOOL) --mode=uninstall \
328	    rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
329	else \
330	  : ; \
331	fi
332	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
333	  test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
334	  temp=$(DESTDIR)$(libdir)/t-charset.alias; \
335	  dest=$(DESTDIR)$(libdir)/charset.alias; \
336	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
337	    orig=$(DESTDIR)$(libdir)/charset.alias; \
338	    sed -f ref-add.sed $$orig > $$temp; \
339	    $(INSTALL_DATA) $$temp $$dest; \
340	    rm -f $$temp; \
341	  else \
342	    if test @GLIBC21@ = no; then \
343	      orig=charset.alias; \
344	      sed -f ref-add.sed $$orig > $$temp; \
345	      $(INSTALL_DATA) $$temp $$dest; \
346	      rm -f $$temp; \
347	    fi; \
348	  fi; \
349	  $(mkinstalldirs) $(DESTDIR)$(localedir); \
350	  test -f $(DESTDIR)$(localedir)/locale.alias \
351	    && orig=$(DESTDIR)$(localedir)/locale.alias \
352	    || orig=$(srcdir)/locale.alias; \
353	  temp=$(DESTDIR)$(localedir)/t-locale.alias; \
354	  dest=$(DESTDIR)$(localedir)/locale.alias; \
355	  sed -f ref-add.sed $$orig > $$temp; \
356	  $(INSTALL_DATA) $$temp $$dest; \
357	  rm -f $$temp; \
358	else \
359	  : ; \
360	fi
361install-data: all
362	$(Q) if test "$(PACKAGE)" = "gettext-tools"; then \
363	  $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
364	  $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
365	  $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
366	  dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
367	  for file in $$dists; do \
368	    $(INSTALL_DATA) $(srcdir)/$$file \
369			    $(DESTDIR)$(gettextsrcdir)/$$file; \
370	  done; \
371	  chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
372	  dists="$(DISTFILES.generated)"; \
373	  for file in $$dists; do \
374	    if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
375	    $(INSTALL_DATA) $$dir/$$file \
376			    $(DESTDIR)$(gettextsrcdir)/$$file; \
377	  done; \
378	  dists="$(DISTFILES.obsolete)"; \
379	  for file in $$dists; do \
380	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
381	  done; \
382	else \
383	  : ; \
384	fi
385
386install-strip: install
387
388installdirs:
389	if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
390	   && test '@USE_INCLUDED_LIBINTL@' = yes; then \
391	  $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
392	else \
393	  : ; \
394	fi
395	if test "$(PACKAGE)" = "gettext-tools" \
396	   && test '@USE_INCLUDED_LIBINTL@' = no; then \
397	  $(mkinstalldirs) $(DESTDIR)$(libdir); \
398	else \
399	  : ; \
400	fi
401	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
402	  test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
403	  $(mkinstalldirs) $(DESTDIR)$(localedir); \
404	else \
405	  : ; \
406	fi
407	if test "$(PACKAGE)" = "gettext-tools"; then \
408	  $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
409	else \
410	  : ; \
411	fi
412
413# Define this as empty until I found a useful application.
414installcheck:
415
416install-shlibs:
417
418uninstall-shlibs:
419
420install-shlibs-strip:
421
422uninstall:
423	if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
424	   && test '@USE_INCLUDED_LIBINTL@' = yes; then \
425	  rm -f $(DESTDIR)$(includedir)/libintl.h; \
426	  $(LIBTOOL) --mode=uninstall \
427	    rm -f $(DESTDIR)$(libdir)/libintl.$la; \
428	else \
429	  : ; \
430	fi
431	if test "$(PACKAGE)" = "gettext-tools" \
432	   && test '@USE_INCLUDED_LIBINTL@' = 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): 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
475dcigettext.$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
480localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
481printf.$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
482
483tags: TAGS
484
485TAGS: $(HEADERS) $(SOURCES)
486	here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
487
488ctags: CTAGS
489
490CTAGS: $(HEADERS) $(SOURCES)
491	here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
492
493id: ID
494
495ID: $(HEADERS) $(SOURCES)
496	here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
497
498coverage.txt::
499
500mostlyclean:
501	rm -f *.a *.la *.o *.obj *.lo core core.*
502	rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
503	rm -f -r .libs _libs
504
505clean:: mostlyclean
506
507distclean: clean
508	rm -f Makefile ID TAGS
509	if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
510	  rm -f ChangeLog.inst $(DISTFILES.normal); \
511	else \
512	  : ; \
513	fi
514
515maintainer-clean: distclean
516	$(E) "This command is intended for maintainers to use;"
517	$(E) "it deletes files that may require special tools to rebuild."
518
519
520# GNU gettext needs not contain the file `VERSION' but contains some
521# other files which should not be distributed in other packages.
522distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
523dist distdir: Makefile
524	if test "$(PACKAGE)" = "gettext-tools"; then \
525	  : ; \
526	else \
527	  if test "$(PACKAGE)" = "gettext-runtime"; then \
528	    additional="$(DISTFILES.gettext)"; \
529	  else \
530	    additional="$(DISTFILES.normal)"; \
531	  fi; \
532	  $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
533	  for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
534	    if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
535	    cp -p $$dir/$$file $(distdir); \
536	  done; \
537	fi
538
539Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
540#	cd $(top_builddir) && $(SHELL) ./config.status
541# This would be more efficient, but doesn't work any more with autoconf-2.57,
542# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
543	cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
544
545# Tell versions [3.59,3.63) of GNU make not to export all variables.
546# Otherwise a system limit (for SysV at least) may be exceeded.
547.NOEXPORT:
548