(distribute): Add tst-gettext3.sh.
[glibc/history.git] / intl / Makefile
blob81557a345771028b0e2fa7f737e4eb718cfc82a3
1 # Copyright (C) 1995-2003, 2005 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 aux = l10nflist explodename plural plural-exp hash-string
27 distribute = gmo.h gettextP.h hash-string.h loadinfo.h locale.alias \
28 plural.y plural-exp.h plural-eval.c po2test.sed \
29 tst-gettext.sh \
30 tst-translit.sh translit.po \
31 tst-gettext2.sh tstlang1.po tstlang2.po \
32 tst-codeset.sh tstcodeset.po \
33 tst-gettext3.sh
35 test-srcs := tst-gettext tst-translit tst-gettext2 tst-codeset tst-gettext3
36 tests = tst-ngettext
38 before-compile = $(objpfx)msgs.h
40 install-others = $(inst_msgcatdir)/locale.alias
42 generated = msgs.h mtrace-tst-gettext tst-gettext.mtrace
43 generated-dirs := domaindir localedir
45 include ../Makeconfig
47 ifneq (no,$(BISON))
48 plural.c: plural.y
49 $(BISON) $(BISONFLAGS) $@ $^
50 ifeq ($(with-cvs),yes)
51 test ! -d CVS || cvs $(CVSOPTS) commit -m'$(BISON) $(BISONFLAGS) $@ $^' $@
52 endif
53 endif
54 $(objpfx)plural.o: plural.c
56 include ../Rules
58 ifeq (no,$(cross-compiling))
59 ifeq (yes,$(build-shared))
60 ifneq ($(strip $(MSGFMT)),:)
61 tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \
62 $(objpfx)tst-codeset.out $(objpfx)tst-gettext3.out
63 ifneq (no,$(PERL))
64 tests: $(objpfx)mtrace-tst-gettext
65 endif
66 endif
67 $(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
68 $(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
69 $(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
70 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/ \
71 $(objpfx)tst-gettext.mtrace
72 $(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
73 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
74 $(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
75 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
76 $(objpfx)tst-codeset.out: tst-codeset.sh $(objpfx)tst-codeset
77 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
78 $(objpfx)tst-gettext3.out: tst-gettext3.sh $(objpfx)tst-gettext3
79 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
80 endif
81 endif
83 $(objpfx)msgs.h: po2test.sed ../po/de.po
84 $(make-target-directory)
85 LC_ALL=C sed -f $^ > $@
87 CFLAGS-tst-gettext.c = -DTESTSTRS_H=\"$(objpfx)msgs.h\"
88 CFLAGS-tst-translit.c = -DOBJPFX=\"$(objpfx)\"
89 CFLAGS-tst-gettext2.c = -DOBJPFX=\"$(objpfx)\"
90 CFLAGS-tst-codeset.c = -DOBJPFX=\"$(objpfx)\"
91 CFLAGS-tst-gettext3.c = -DOBJPFX=\"$(objpfx)\"
93 $(objpfx)tst-translit.out: $(objpfx)tst-gettext.out
94 $(objpfx)tst-gettext2.out: $(objpfx)tst-gettext.out
95 $(objpfx)tst-codeset.out: $(objpfx)tst-gettext.out
96 $(objpfx)tst-gettext3.out: $(objpfx)tst-gettext.out
98 CPPFLAGS += -D'LOCALEDIR="$(msgcatdir)"' \
99 -D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
100 BISONFLAGS = --yacc --name-prefix=__gettext --output
102 $(inst_msgcatdir)/locale.alias: locale.alias $(+force)
103 $(do-install)