xref: /openbsd/gnu/usr.bin/gcc/gcc/intl/Makefile.in (revision c87b03e5)
1*c87b03e5Sespie# Makefile for directory with message catalog handling in GNU NLS Utilities.
2*c87b03e5Sespie# Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
3*c87b03e5Sespie#
4*c87b03e5Sespie# This program is free software; you can redistribute it and/or modify it
5*c87b03e5Sespie# under the terms of the GNU Library General Public License as published
6*c87b03e5Sespie# by the Free Software Foundation; either version 2, or (at your option)
7*c87b03e5Sespie# any later version.
8*c87b03e5Sespie#
9*c87b03e5Sespie# This program is distributed in the hope that it will be useful,
10*c87b03e5Sespie# but WITHOUT ANY WARRANTY; without even the implied warranty of
11*c87b03e5Sespie# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12*c87b03e5Sespie# Library General Public License for more details.
13*c87b03e5Sespie#
14*c87b03e5Sespie# You should have received a copy of the GNU Library General Public
15*c87b03e5Sespie# License along with this program; if not, write to the Free Software
16*c87b03e5Sespie# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17*c87b03e5Sespie# USA.
18*c87b03e5Sespie
19*c87b03e5SespiePACKAGE = @PACKAGE@
20*c87b03e5SespieVERSION = @VERSION@
21*c87b03e5Sespie
22*c87b03e5SespieSHELL = /bin/sh
23*c87b03e5Sespie
24*c87b03e5Sespiesrcdir = @srcdir@
25*c87b03e5Sespietop_srcdir = @top_srcdir@
26*c87b03e5Sespietop_builddir = ..
27*c87b03e5SespieVPATH = @srcdir@
28*c87b03e5Sespie
29*c87b03e5Sespieprefix = @prefix@
30*c87b03e5Sespieexec_prefix = @exec_prefix@
31*c87b03e5Sespietransform = @program_transform_name@
32*c87b03e5Sespielibdir = @libdir@
33*c87b03e5Sespieincludedir = @includedir@
34*c87b03e5Sespiedatadir = @datadir@
35*c87b03e5Sespielocaledir = $(datadir)/locale
36*c87b03e5Sespiegettextsrcdir = $(datadir)/gettext/intl
37*c87b03e5Sespiealiaspath = $(localedir)
38*c87b03e5Sespiesubdir = intl
39*c87b03e5Sespie
40*c87b03e5SespieINSTALL = @INSTALL@
41*c87b03e5SespieINSTALL_DATA = @INSTALL_DATA@
42*c87b03e5SespieMKINSTALLDIRS = @MKINSTALLDIRS@
43*c87b03e5Sespiemkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
44*c87b03e5Sespie
45*c87b03e5Sespiel = @INTL_LIBTOOL_SUFFIX_PREFIX@
46*c87b03e5SespieOUTPUT_OPTION = @OUTPUT_OPTION@
47*c87b03e5Sespie
48*c87b03e5SespieAR = ar
49*c87b03e5SespieCC = @CC@
50*c87b03e5SespieLIBTOOL = @LIBTOOL@
51*c87b03e5SespieRANLIB = @RANLIB@
52*c87b03e5SespieYACC = @INTLBISON@ -y -d
53*c87b03e5SespieYFLAGS = --name-prefix=__gettext
54*c87b03e5Sespie
55*c87b03e5SespieDEFS = -DIN_GCC -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
56*c87b03e5Sespie-DLIBDIR=\"$(libdir)\" @DEFS@
57*c87b03e5SespieCPPFLAGS = @CPPFLAGS@
58*c87b03e5SespieCFLAGS = @CFLAGS@
59*c87b03e5SespieLDFLAGS = @LDFLAGS@
60*c87b03e5Sespie
61*c87b03e5SespieCOMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
62*c87b03e5Sespie
63*c87b03e5SespieHEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
64*c87b03e5SespieCOMHDRS = gettext.h gettextP.h hash-string.h
65*c87b03e5SespieSOURCES = $(COMSRCS) intl-compat.c
66*c87b03e5SespieCOMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
67*c87b03e5Sespiefinddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
68*c87b03e5Sespieexplodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
69*c87b03e5Sespielocalcharset.c
70*c87b03e5SespieOBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
71*c87b03e5Sespiefinddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
72*c87b03e5Sespieexplodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
73*c87b03e5Sespieplural.$lo localcharset.$lo
74*c87b03e5SespieGETTOBJS = intl-compat.$lo
75*c87b03e5SespieDISTFILES.common = Makefile.in \
76*c87b03e5Sespieconfig.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
77*c87b03e5SespieDISTFILES.generated = plural.c
78*c87b03e5SespieDISTFILES.normal = VERSION
79*c87b03e5SespieDISTFILES.gettext = COPYING.LIB-2 COPYING.LIB-2.1 libintl.glibc
80*c87b03e5SespieDISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
81*c87b03e5Sespie
82*c87b03e5Sespie# Libtool's library version information for libintl.
83*c87b03e5Sespie# Before making a gettext release, the gettext maintainer must change this
84*c87b03e5Sespie# according to the libtool documentation, section "Library interface versions".
85*c87b03e5Sespie# Maintainers of other packages that include the intl directory must *not*
86*c87b03e5Sespie# change these values.
87*c87b03e5SespieLTV_CURRENT=1
88*c87b03e5SespieLTV_REVISION=1
89*c87b03e5SespieLTV_AGE=0
90*c87b03e5Sespie
91*c87b03e5Sespie.SUFFIXES:
92*c87b03e5Sespie.SUFFIXES: .c .y .o .lo .sin .sed
93*c87b03e5Sespie.c.o:
94*c87b03e5Sespie	$(COMPILE) $< $(OUTPUT_OPTION)
95*c87b03e5Sespie.c.lo:
96*c87b03e5Sespie	$(LIBTOOL) --mode=compile $(COMPILE) $<
97*c87b03e5Sespie
98*c87b03e5Sespie.y.c:
99*c87b03e5Sespie	$(YACC) $(YFLAGS) --output $@ $<
100*c87b03e5Sespie	rm -f $*.h
101*c87b03e5Sespie
102*c87b03e5Sespie.sin.sed:
103*c87b03e5Sespie	sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
104*c87b03e5Sespie	mv t-$@ $@
105*c87b03e5Sespie
106*c87b03e5SespieINCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir) \
107*c87b03e5Sespie	   -I$(top_srcdir)/config -I$(top_srcdir)/../include
108*c87b03e5Sespie
109*c87b03e5Sespie# GCC LOCAL: Removed libintl.h from all-yes.
110*c87b03e5Sespieall: all-@USE_INCLUDED_LIBINTL@
111*c87b03e5Sespieall-yes: libintl.$la charset.alias ref-add.sed ref-del.sed
112*c87b03e5Sespieall-no: all-no-@BUILD_INCLUDED_LIBINTL@
113*c87b03e5Sespieall-no-yes: libgnuintl.$la
114*c87b03e5Sespieall-no-no:
115*c87b03e5Sespie
116*c87b03e5Sespielibintl.a libgnuintl.a: $(OBJECTS)
117*c87b03e5Sespie	rm -f $@
118*c87b03e5Sespie	$(AR) cru $@ $(OBJECTS)
119*c87b03e5Sespie	$(RANLIB) $@
120*c87b03e5Sespie
121*c87b03e5Sespielibintl.la libgnuintl.la: $(OBJECTS)
122*c87b03e5Sespie	$(LIBTOOL) --mode=link \
123*c87b03e5Sespie	  $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
124*c87b03e5Sespie	  $(OBJECTS) @LIBICONV@ \
125*c87b03e5Sespie	  -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
126*c87b03e5Sespie	  -rpath $(libdir) \
127*c87b03e5Sespie	  -no-undefined
128*c87b03e5Sespie
129*c87b03e5Sespie#GCC LOCAL: Do not install this file.
130*c87b03e5Sespie#libintl.h: libgnuintl.h
131*c87b03e5Sespie#	cp $(srcdir)/libgnuintl.h libintl.h
132*c87b03e5Sespie
133*c87b03e5Sespiecharset.alias: config.charset
134*c87b03e5Sespie	$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
135*c87b03e5Sespie	mv t-$@ $@
136*c87b03e5Sespie
137*c87b03e5Sespiecheck: all
138*c87b03e5Sespie
139*c87b03e5Sespie# This installation goal is only used in GNU gettext.  Packages which
140*c87b03e5Sespie# only use the library should use install instead.
141*c87b03e5Sespie
142*c87b03e5Sespie# We must not install the libintl.h/libintl.a files if we are on a
143*c87b03e5Sespie# system which has the GNU gettext() function in its C library or in a
144*c87b03e5Sespie# separate library.
145*c87b03e5Sespie# If you want to use the one which comes with this version of the
146*c87b03e5Sespie# package, you have to use `configure --with-included-gettext'.
147*c87b03e5Sespieinstall: install-exec install-data
148*c87b03e5Sespieinstall-exec: all
149*c87b03e5Sespie	if test "$(PACKAGE)" = "gettext" \
150*c87b03e5Sespie	   && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
151*c87b03e5Sespie	  $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
152*c87b03e5Sespie	  $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
153*c87b03e5Sespie	  $(LIBTOOL) --mode=install \
154*c87b03e5Sespie	    $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
155*c87b03e5Sespie	else \
156*c87b03e5Sespie	  : ; \
157*c87b03e5Sespie	fi
158*c87b03e5Sespie	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
159*c87b03e5Sespie	  $(mkinstalldirs) $(DESTDIR)$(libdir); \
160*c87b03e5Sespie	  temp=$(DESTDIR)$(libdir)/t-charset.alias; \
161*c87b03e5Sespie	  dest=$(DESTDIR)$(libdir)/charset.alias; \
162*c87b03e5Sespie	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
163*c87b03e5Sespie	    orig=$(DESTDIR)$(libdir)/charset.alias; \
164*c87b03e5Sespie	    sed -f ref-add.sed $$orig > $$temp; \
165*c87b03e5Sespie	    $(INSTALL_DATA) $$temp $$dest; \
166*c87b03e5Sespie	    rm -f $$temp; \
167*c87b03e5Sespie	  else \
168*c87b03e5Sespie	    if test @GLIBC21@ = no; then \
169*c87b03e5Sespie	      orig=charset.alias; \
170*c87b03e5Sespie	      sed -f ref-add.sed $$orig > $$temp; \
171*c87b03e5Sespie	      $(INSTALL_DATA) $$temp $$dest; \
172*c87b03e5Sespie	      rm -f $$temp; \
173*c87b03e5Sespie	    fi; \
174*c87b03e5Sespie	  fi; \
175*c87b03e5Sespie	  $(mkinstalldirs) $(DESTDIR)$(localedir); \
176*c87b03e5Sespie	  test -f $(DESTDIR)$(localedir)/locale.alias \
177*c87b03e5Sespie	    && orig=$(DESTDIR)$(localedir)/locale.alias \
178*c87b03e5Sespie	    || orig=$(srcdir)/locale.alias; \
179*c87b03e5Sespie	  temp=$(DESTDIR)$(localedir)/t-locale.alias; \
180*c87b03e5Sespie	  dest=$(DESTDIR)$(localedir)/locale.alias; \
181*c87b03e5Sespie	  sed -f ref-add.sed $$orig > $$temp; \
182*c87b03e5Sespie	  $(INSTALL_DATA) $$temp $$dest; \
183*c87b03e5Sespie	  rm -f $$temp; \
184*c87b03e5Sespie	else \
185*c87b03e5Sespie	  : ; \
186*c87b03e5Sespie	fi
187*c87b03e5Sespieinstall-data: all
188*c87b03e5Sespie	if test "$(PACKAGE)" = "gettext"; then \
189*c87b03e5Sespie	  $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
190*c87b03e5Sespie	  $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
191*c87b03e5Sespie	  $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
192*c87b03e5Sespie	  dists="COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common)"; \
193*c87b03e5Sespie	  for file in $$dists; do \
194*c87b03e5Sespie	    $(INSTALL_DATA) $(srcdir)/$$file \
195*c87b03e5Sespie			    $(DESTDIR)$(gettextsrcdir)/$$file; \
196*c87b03e5Sespie	  done; \
197*c87b03e5Sespie	  chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
198*c87b03e5Sespie	  dists="$(DISTFILES.generated)"; \
199*c87b03e5Sespie	  for file in $$dists; do \
200*c87b03e5Sespie	    if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
201*c87b03e5Sespie	    $(INSTALL_DATA) $$dir/$$file \
202*c87b03e5Sespie			    $(DESTDIR)$(gettextsrcdir)/$$file; \
203*c87b03e5Sespie	  done; \
204*c87b03e5Sespie	  dists="$(DISTFILES.obsolete)"; \
205*c87b03e5Sespie	  for file in $$dists; do \
206*c87b03e5Sespie	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
207*c87b03e5Sespie	  done; \
208*c87b03e5Sespie	else \
209*c87b03e5Sespie	  : ; \
210*c87b03e5Sespie	fi
211*c87b03e5Sespie
212*c87b03e5Sespie# Define this as empty until I found a useful application.
213*c87b03e5Sespieinstallcheck:
214*c87b03e5Sespie
215*c87b03e5Sespieuninstall:
216*c87b03e5Sespie	if test "$(PACKAGE)" = "gettext" \
217*c87b03e5Sespie	   && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
218*c87b03e5Sespie	  rm -f $(DESTDIR)$(includedir)/libintl.h; \
219*c87b03e5Sespie	  $(LIBTOOL) --mode=uninstall \
220*c87b03e5Sespie	    rm -f $(DESTDIR)$(libdir)/libintl.$la; \
221*c87b03e5Sespie	else \
222*c87b03e5Sespie	  : ; \
223*c87b03e5Sespie	fi
224*c87b03e5Sespie	if test '@USE_INCLUDED_LIBINTL@' = yes; then \
225*c87b03e5Sespie	  if test -f $(DESTDIR)$(libdir)/charset.alias; then \
226*c87b03e5Sespie	    temp=$(DESTDIR)$(libdir)/t-charset.alias; \
227*c87b03e5Sespie	    dest=$(DESTDIR)$(libdir)/charset.alias; \
228*c87b03e5Sespie	    sed -f ref-del.sed $$dest > $$temp; \
229*c87b03e5Sespie	    if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
230*c87b03e5Sespie	      rm -f $$dest; \
231*c87b03e5Sespie	    else \
232*c87b03e5Sespie	      $(INSTALL_DATA) $$temp $$dest; \
233*c87b03e5Sespie	    fi; \
234*c87b03e5Sespie	    rm -f $$temp; \
235*c87b03e5Sespie	  fi; \
236*c87b03e5Sespie	  if test -f $(DESTDIR)$(localedir)/locale.alias; then \
237*c87b03e5Sespie	    temp=$(DESTDIR)$(localedir)/t-locale.alias; \
238*c87b03e5Sespie	    dest=$(DESTDIR)$(localedir)/locale.alias; \
239*c87b03e5Sespie	    sed -f ref-del.sed $$dest > $$temp; \
240*c87b03e5Sespie	    if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
241*c87b03e5Sespie	      rm -f $$dest; \
242*c87b03e5Sespie	    else \
243*c87b03e5Sespie	      $(INSTALL_DATA) $$temp $$dest; \
244*c87b03e5Sespie	    fi; \
245*c87b03e5Sespie	    rm -f $$temp; \
246*c87b03e5Sespie	  fi; \
247*c87b03e5Sespie	else \
248*c87b03e5Sespie	  : ; \
249*c87b03e5Sespie	fi
250*c87b03e5Sespie	if test "$(PACKAGE)" = "gettext"; then \
251*c87b03e5Sespie	  for file in VERSION ChangeLog COPYING.LIB-2 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
252*c87b03e5Sespie	    rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
253*c87b03e5Sespie	  done; \
254*c87b03e5Sespie	else \
255*c87b03e5Sespie	  : ; \
256*c87b03e5Sespie	fi
257*c87b03e5Sespie
258*c87b03e5Sespieinfo dvi:
259*c87b03e5Sespie
260*c87b03e5Sespie$(OBJECTS): ../config.h libgnuintl.h
261*c87b03e5Sespiebindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
262*c87b03e5Sespiedcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
263*c87b03e5Sespie
264*c87b03e5Sespietags: TAGS
265*c87b03e5Sespie
266*c87b03e5SespieTAGS: $(HEADERS) $(SOURCES)
267*c87b03e5Sespie	here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
268*c87b03e5Sespie
269*c87b03e5Sespieid: ID
270*c87b03e5Sespie
271*c87b03e5SespieID: $(HEADERS) $(SOURCES)
272*c87b03e5Sespie	here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
273*c87b03e5Sespie
274*c87b03e5Sespie
275*c87b03e5Sespiemostlyclean:
276*c87b03e5Sespie	rm -f *.a *.la *.o *.lo core core.*
277*c87b03e5Sespie	rm -f libintl.h charset.alias ref-add.sed ref-del.sed
278*c87b03e5Sespie	rm -f -r .libs _libs
279*c87b03e5Sespie
280*c87b03e5Sespieclean: mostlyclean
281*c87b03e5Sespie
282*c87b03e5Sespiedistclean: clean
283*c87b03e5Sespie	rm -f Makefile ID TAGS
284*c87b03e5Sespie	if test "$(PACKAGE)" = gettext; then \
285*c87b03e5Sespie	  rm -f ChangeLog.inst $(DISTFILES.normal); \
286*c87b03e5Sespie	else \
287*c87b03e5Sespie	  : ; \
288*c87b03e5Sespie	fi
289*c87b03e5Sespie
290*c87b03e5Sespiemaintainer-clean: distclean
291*c87b03e5Sespie	@echo "This command is intended for maintainers to use;"
292*c87b03e5Sespie	@echo "it deletes files that may require special tools to rebuild."
293*c87b03e5Sespie
294*c87b03e5Sespie
295*c87b03e5Sespie# GNU gettext needs not contain the file `VERSION' but contains some
296*c87b03e5Sespie# other files which should not be distributed in other packages.
297*c87b03e5Sespiedistdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
298*c87b03e5Sespiedist distdir: Makefile
299*c87b03e5Sespie	if test "$(PACKAGE)" = gettext; then \
300*c87b03e5Sespie	  additional="$(DISTFILES.gettext)"; \
301*c87b03e5Sespie	else \
302*c87b03e5Sespie	  additional="$(DISTFILES.normal)"; \
303*c87b03e5Sespie	fi; \
304*c87b03e5Sespie	$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
305*c87b03e5Sespie	for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
306*c87b03e5Sespie	  if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
307*c87b03e5Sespie	  ln $$dir/$$file $(distdir) 2> /dev/null \
308*c87b03e5Sespie	    || cp -p $$dir/$$file $(distdir); \
309*c87b03e5Sespie	done
310*c87b03e5Sespie
311*c87b03e5SespieMakefile: Makefile.in ../config.status
312*c87b03e5Sespie	cd .. \
313*c87b03e5Sespie	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
314*c87b03e5Sespie
315*c87b03e5Sespie# Tell versions [3.59,3.63) of GNU make not to export all variables.
316*c87b03e5Sespie# Otherwise a system limit (for SysV at least) may be exceeded.
317*c87b03e5Sespie.NOEXPORT:
318