1# Makefile for directory with message catalog handling in GNU NLS Utilities. 2# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. 3# 4# This program is free software; you can redistribute it and/or modify 5# it under the terms of the GNU General Public License as published by 6# 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 12# GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License 15# along with this program; if not, write to the Free Software 16# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17 18PACKAGE = @PACKAGE@ 19VERSION = @VERSION@ 20 21SHELL = /bin/sh 22 23srcdir = @srcdir@ 24top_srcdir = @top_srcdir@ 25top_builddir = .. 26VPATH = @srcdir@ 27 28prefix = @prefix@ 29exec_prefix = @exec_prefix@ 30transform = @program_transform_name@ 31libdir = $(exec_prefix)/lib 32includedir = $(prefix)/include 33datadir = $(prefix)/@DATADIRNAME@ 34localedir = $(datadir)/locale 35gnulocaledir = $(prefix)/share/locale 36gettextsrcdir = @datadir@/gettext/intl 37aliaspath = $(localedir):. 38subdir = intl 39 40INSTALL = @INSTALL@ 41INSTALL_DATA = @INSTALL_DATA@ 42MKINSTALLDIRS = @MKINSTALLDIRS@ 43 44l = @l@ 45 46AR = ar 47CC = @CC@ 48LIBTOOL = @LIBTOOL@ 49RANLIB = @RANLIB@ 50 51DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ 52-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ 53CFLAGS = @CFLAGS@ 54LDFLAGS = @LDFLAGS@ 55 56COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) 57 58HEADERS = $(COMHDRS) libgettext.h loadinfo.h 59COMHDRS = gettext.h gettextP.h hash-string.h 60SOURCES = $(COMSRCS) intl-compat.c cat-compat.c 61COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \ 62finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \ 63explodename.c 64OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \ 65finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \ 66explodename.$lo 67CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo 68GETTOBJS = intl-compat.$lo 69DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \ 70xopen-msg.sed $(HEADERS) $(SOURCES) 71DISTFILES.normal = VERSION 72DISTFILES.gettext = libintl.glibc intlh.inst.in 73 74.SUFFIXES: 75.SUFFIXES: .c .o .lo 76.c.o: 77 $(COMPILE) $< 78.c.lo: 79 $(LIBTOOL) --mode=compile $(COMPILE) $< 80 81INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib 82 83all: all-@USE_INCLUDED_LIBINTL@ 84 85all-yes: libintl.$la intlh.inst 86all-no: 87 88libintl.a: $(OBJECTS) 89 rm -f $@ 90 $(AR) cru $@ $(OBJECTS) 91 $(RANLIB) $@ 92 93libintl.la: $(OBJECTS) 94 $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \ 95 -version-info 1:0 -rpath $(libdir) 96 97../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot 98 cd ../po && $(MAKE) cat-id-tbl.$lo 99 100check: all 101 102# This installation goal is only used in GNU gettext. Packages which 103# only use the library should use install instead. 104 105# We must not install the libintl.h/libintl.a files if we are on a 106# system which has the gettext() function in its C library or in a 107# separate library or use the catgets interface. A special case is 108# where configure found a previously installed GNU gettext library. 109# If you want to use the one which comes with this version of the 110# package, you have to use `configure --with-included-gettext'. 111install: install-exec install-data 112install-exec: all 113 if test "$(PACKAGE)" = "gettext" \ 114 && test '@INTLOBJS@' = '$(GETTOBJS)'; then \ 115 if test -r $(MKINSTALLDIRS); then \ 116 $(MKINSTALLDIRS) $(libdir) $(includedir); \ 117 else \ 118 $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \ 119 fi; \ 120 $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \ 121 $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \ 122 else \ 123 : ; \ 124 fi 125install-data: all 126 if test "$(PACKAGE)" = "gettext"; then \ 127 if test -r $(MKINSTALLDIRS); then \ 128 $(MKINSTALLDIRS) $(gettextsrcdir); \ 129 else \ 130 $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ 131 fi; \ 132 $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ 133 cd $(srcdir) && \ 134 dists="$(DISTFILES.common)"; \ 135 for file in $$dists; do \ 136 $(INSTALL_DATA) $$file $(gettextsrcdir)/$$file; \ 137 done; \ 138 else \ 139 : ; \ 140 fi 141 142# Define this as empty until I found a useful application. 143installcheck: 144 145uninstall: 146 dists="$(DISTFILES.common)"; \ 147 for file in $$dists; do \ 148 rm -f $(gettextsrcdir)/$$file; \ 149 done 150 151info dvi: 152 153$(OBJECTS): ../config.h libgettext.h 154bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h 155dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h 156 157tags: TAGS 158 159TAGS: $(HEADERS) $(SOURCES) 160 here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES) 161 162id: ID 163 164ID: $(HEADERS) $(SOURCES) 165 here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES) 166 167 168mostlyclean: 169 rm -f *.a *.o *.lo core core.* 170 171clean: mostlyclean 172 173distclean: clean 174 rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h 175 176maintainer-clean: distclean 177 @echo "This command is intended for maintainers to use;" 178 @echo "it deletes files that may require special tools to rebuild." 179 180 181# GNU gettext needs not contain the file `VERSION' but contains some 182# other files which should not be distributed in other packages. 183distdir = ../$(PACKAGE)-$(VERSION)/$(subdir) 184dist distdir: Makefile $(DISTFILES) 185 if test "$(PACKAGE)" = gettext; then \ 186 additional="$(DISTFILES.gettext)"; \ 187 else \ 188 additional="$(DISTFILES.normal)"; \ 189 fi; \ 190 for file in $(DISTFILES.common) $$additional; do \ 191 ln $(srcdir)/$$file $(distdir) 2> /dev/null \ 192 || cp -p $(srcdir)/$$file $(distdir); \ 193 done 194 195dist-libc: 196 tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc 197 198Makefile: Makefile.in ../config.status 199 cd .. \ 200 && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status 201 202# The dependency for intlh.inst is different in gettext and all other 203# packages. Because we cannot you GNU make features we have to solve 204# the problem while rewriting Makefile.in. 205@GT_YES@intlh.inst: intlh.inst.in ../config.status 206@GT_YES@ cd .. \ 207@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \ 208@GT_YES@ $(SHELL) ./config.status 209@GT_NO@.PHONY: intlh.inst 210@GT_NO@intlh.inst: 211 212# Tell versions [3.59,3.63) of GNU make not to export all variables. 213# Otherwise a system limit (for SysV at least) may be exceeded. 214.NOEXPORT: 215