source: branches/libc-0.6/src/libctests/glibc/intl/Makefile

Last change on this file was 2036, checked in by bird, 20 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 4.8 KB
Line 
1# Copyright (C) 1995-2003, 2005 Free Software Foundation, Inc.
2# This file is part of the GNU C Library.
3
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.
8
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.
13
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.
18
19# Makefile for intl subdirectory: message handling code from GNU gettext.
20
21subdir = intl
22headers = libintl.h
23routines = bindtextdom dcgettext dgettext gettext \
24 dcigettext dcngettext dngettext ngettext \
25 finddomain loadmsgcat localealias textdomain
26aux = l10nflist explodename plural plural-exp hash-string
27distribute = 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 \
34 tst-gettext4.sh tst-gettext4-de.po tst-gettext4-fr.po \
35 tst-gettext5.sh
36
37include ../Makeconfig
38
39multithread-test-srcs := tst-gettext4 tst-gettext5
40test-srcs := tst-gettext tst-translit tst-gettext2 tst-codeset tst-gettext3
41ifeq ($(have-thread-library),yes)
42test-srcs += $(multithread-test-srcs)
43endif
44tests = tst-ngettext
45
46before-compile = $(objpfx)msgs.h
47
48install-others = $(inst_msgcatdir)/locale.alias
49
50generated = msgs.h mtrace-tst-gettext tst-gettext.mtrace
51generated-dirs := domaindir localedir
52
53ifneq (no,$(BISON))
54plural.c: plural.y
55 $(BISON) $(BISONFLAGS) $@ $^
56ifeq ($(with-cvs),yes)
57 test ! -d CVS || cvs $(CVSOPTS) commit -m'$(BISON) $(BISONFLAGS) $@ $^' $@
58endif
59endif
60$(objpfx)plural.o: plural.c
61
62include ../Rules
63
64ifeq (no,$(cross-compiling))
65ifeq (yes,$(build-shared))
66ifneq ($(strip $(MSGFMT)),:)
67tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \
68 $(objpfx)tst-codeset.out $(objpfx)tst-gettext3.out
69ifeq ($(have-thread-library),yes)
70tests: $(objpfx)tst-gettext4.out $(objpfx)tst-gettext5.out
71endif
72ifneq (no,$(PERL))
73tests: $(objpfx)mtrace-tst-gettext
74endif
75endif
76$(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
77 $(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
78$(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
79 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/ \
80 $(objpfx)tst-gettext.mtrace
81$(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
82 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
83$(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
84 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
85$(objpfx)tst-codeset.out: tst-codeset.sh $(objpfx)tst-codeset
86 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
87$(objpfx)tst-gettext3.out: tst-gettext3.sh $(objpfx)tst-gettext3
88 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
89$(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
90 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
91$(objpfx)tst-gettext5.out: tst-gettext5.sh $(objpfx)tst-gettext5
92 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
93endif
94endif
95
96$(objpfx)msgs.h: po2test.sed ../po/de.po
97 $(make-target-directory)
98 LC_ALL=C sed -f $^ > $@
99
100CFLAGS-tst-gettext.c = -DTESTSTRS_H=\"$(objpfx)msgs.h\"
101CFLAGS-tst-translit.c = -DOBJPFX=\"$(objpfx)\"
102CFLAGS-tst-gettext2.c = -DOBJPFX=\"$(objpfx)\"
103CFLAGS-tst-codeset.c = -DOBJPFX=\"$(objpfx)\"
104CFLAGS-tst-gettext3.c = -DOBJPFX=\"$(objpfx)\"
105CFLAGS-tst-gettext4.c = -DOBJPFX=\"$(objpfx)\"
106CFLAGS-tst-gettext5.c = -DOBJPFX=\"$(objpfx)\"
107
108ifeq ($(have-thread-library),yes)
109ifeq (yes,$(build-shared))
110$(addprefix $(objpfx),$(multithread-test-srcs)): $(shared-thread-library)
111else
112$(addprefix $(objpfx),$(multithread-test-srcs)): $(static-thread-library)
113endif
114ifeq (yes,$(build-bounded))
115$(multithread-test-srcs:%=$(objpfx)%-bp): $(bounded-thread-library)
116endif
117endif
118
119$(objpfx)tst-translit.out: $(objpfx)tst-gettext.out
120$(objpfx)tst-gettext2.out: $(objpfx)tst-gettext.out
121$(objpfx)tst-codeset.out: $(objpfx)tst-gettext.out
122$(objpfx)tst-gettext3.out: $(objpfx)tst-gettext.out
123$(objpfx)tst-gettext4.out: $(objpfx)tst-gettext.out
124$(objpfx)tst-gettext5.out: $(objpfx)tst-gettext.out
125
126CPPFLAGS += -D'LOCALEDIR="$(msgcatdir)"' \
127 -D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
128BISONFLAGS = --yacc --name-prefix=__gettext --output
129
130$(inst_msgcatdir)/locale.alias: locale.alias $(+force)
131 $(do-install)
Note: See TracBrowser for help on using the repository browser.