Update.
[glibc.git] / intl / Makefile
blobbb4b21b7e9ced706901a256a6936d702c6490c39
1 # Copyright (C) 1995-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # The GNU C Library 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 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, write to the Free
16 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 # 02111-1307 USA.
19 # Makefile for intl subdirectory: message handling code from GNU gettext.
21 subdir = intl
22 headers = libintl.h
23 routines = bindtextdom dcgettext dgettext gettext \
24 dcigettext dcngettext dngettext ngettext \
25 finddomain loadmsgcat localealias textdomain \
26 l10nflist explodename plural plural-exp
27 distribute = gettext.h gettextP.h hash-string.h loadinfo.h locale.alias \
28 plural.y plural-exp.h po2test.sed tst-gettext.sh tst-translit.sh \
29 translit.po tst-gettext2.sh tstlang1.po tstlang2.po tstcodeset.po\
30 tst-codeset.sh plural-eval.c
32 test-srcs := tst-gettext tst-translit tst-gettext2 tst-codeset
33 tests = tst-ngettext
35 before-compile = $(objpfx)msgs.h
37 install-others = $(inst_msgcatdir)/locale.alias
39 generated = msgs.h mtrace-tst-gettext tst-gettext.mtrace
40 generated-dirs := domaindir localedir
42 include ../Makeconfig
44 ifneq (no,$(BISON))
45 plural.c: plural.y
46 $(BISON) $(BISONFLAGS) $@ $^
47 ifeq ($(with-cvs),yes)
48 test ! -d CVS || cvs $(CVSOPTS) commit -m'$(BISON) $(BISONFLAGS) $@ $^' $@
49 endif
50 endif
51 $(objpfx)plural.o: plural.c
53 include ../Rules
55 ifeq (no,$(cross-compiling))
56 ifeq (yes,$(build-shared))
57 ifneq ($(strip $(MSGFMT)),:)
58 tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \
59 $(objpfx)tst-codeset.out
60 ifneq (no,$(PERL))
61 tests: $(objpfx)mtrace-tst-gettext
62 endif
63 endif
64 $(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
65 $(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
66 $(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
67 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/ \
68 $(objpfx)tst-gettext.mtrace
69 $(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
70 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
71 $(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
72 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
73 $(objpfx)tst-codeset.out: tst-codeset.sh $(objpfx)tst-codeset
74 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
75 endif
76 endif
78 $(objpfx)msgs.h: po2test.sed ../po/de.po
79 $(make-target-directory)
80 sed -f $^ > $@
82 CFLAGS-tst-gettext.c = -DTESTSTRS_H=\"$(objpfx)msgs.h\"
83 CFLAGS-tst-gettext2.c = -DOBJPFX=\"$(objpfx)\"
84 CFLAGS-tst-translit.c = -DOBJPFX=\"$(objpfx)\"
85 CFLAGS-tst-codeset.c = -DOBJPFX=\"$(objpfx)\"
87 $(objpfx)tst-translit.out: $(objpfx)tst-gettext.out
88 $(objpfx)tst-gettext2.out: $(objpfx)tst-gettext.out
89 $(objpfx)tst-codeset.out: $(objpfx)tst-gettext.out
91 CPPFLAGS += -D'LOCALEDIR="$(msgcatdir)"' \
92 -D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
93 BISONFLAGS = --yacc --name-prefix=__gettext --output
95 $(inst_msgcatdir)/locale.alias: locale.alias $(+force)
96 $(do-install)