]> git.ipfire.org Git - thirdparty/glibc.git/blame - intl/Makefile
Minor optimization of popcount in l10nflist
[thirdparty/glibc.git] / intl / Makefile
CommitLineData
2ecc7d93 1# Copyright (C) 1995-2003, 2005, 2008 Free Software Foundation, Inc.
91c7b85d 2# This file is part of the GNU C Library.
41cfadd6 3
91c7b85d 4# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
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.
41cfadd6 8
91c7b85d
RM
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
41bdb6e2 12# Lesser General Public License for more details.
41cfadd6 13
41bdb6e2
AJ
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.
0c5ecdc4
UD
18
19# Makefile for intl subdirectory: message handling code from GNU gettext.
41cfadd6 20
24906b43 21subdir = intl
91c7b85d
RM
22headers = libintl.h
23routines = bindtextdom dcgettext dgettext gettext \
abbffdf9 24 dcigettext dcngettext dngettext ngettext \
dd9423a6
UD
25 finddomain loadmsgcat localealias textdomain
26aux = l10nflist explodename plural plural-exp hash-string
5cb5cfa2 27distribute = gmo.h gettextP.h hash-string.h loadinfo.h locale.alias \
9a79284e
UD
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 \
8406a53a
UD
33 tst-gettext3.sh \
34 tst-gettext4.sh tst-gettext4-de.po tst-gettext4-fr.po \
2ecc7d93 35 tst-gettext5.sh tst-gettext6.sh
9a79284e 36
8406a53a
UD
37include ../Makeconfig
38
2ecc7d93 39multithread-test-srcs := tst-gettext4 tst-gettext5 tst-gettext6
9a79284e 40test-srcs := tst-gettext tst-translit tst-gettext2 tst-codeset tst-gettext3
8406a53a
UD
41ifeq ($(have-thread-library),yes)
42test-srcs += $(multithread-test-srcs)
43endif
1267f93e 44tests = tst-ngettext
abbffdf9
UD
45
46before-compile = $(objpfx)msgs.h
7a12c6bb 47
4a33c2f5 48install-others = $(inst_msgcatdir)/locale.alias
24906b43 49
b025588a 50generated = msgs.h mtrace-tst-gettext tst-gettext.mtrace
cdfb970d 51generated-dirs := domaindir localedir
a1d84548 52
ae113383 53ifneq (no,$(BISON))
abbffdf9 54plural.c: plural.y
ae113383 55 $(BISON) $(BISONFLAGS) $@ $^
abbffdf9 56ifeq ($(with-cvs),yes)
ae113383 57 test ! -d CVS || cvs $(CVSOPTS) commit -m'$(BISON) $(BISONFLAGS) $@ $^' $@
abbffdf9 58endif
199745d1 59endif
abbffdf9
UD
60$(objpfx)plural.o: plural.c
61
91c7b85d 62include ../Rules
24906b43 63
955ebce4 64ifeq (no,$(cross-compiling))
7d4de961 65ifeq (yes,$(build-shared))
328c5f65 66ifneq ($(strip $(MSGFMT)),:)
c44a663d 67tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \
9a79284e 68 $(objpfx)tst-codeset.out $(objpfx)tst-gettext3.out
8406a53a 69ifeq ($(have-thread-library),yes)
2ecc7d93
UD
70tests: $(objpfx)tst-gettext4.out $(objpfx)tst-gettext5.out \
71 $(objpfx)tst-gettext6.out
8406a53a 72endif
89e89345
AJ
73ifneq (no,$(PERL))
74tests: $(objpfx)mtrace-tst-gettext
75endif
d4eaa8bb 76endif
6baa3368 77$(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
55e2d5c7 78 $(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
4ab8e75a 79$(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
55e2d5c7
UD
80 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/ \
81 $(objpfx)tst-gettext.mtrace
4ab8e75a 82$(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
9f835f5f 83 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
cdfb970d 84$(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
111bb972 85 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
c44a663d
UD
86$(objpfx)tst-codeset.out: tst-codeset.sh $(objpfx)tst-codeset
87 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
9a79284e
UD
88$(objpfx)tst-gettext3.out: tst-gettext3.sh $(objpfx)tst-gettext3
89 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
8406a53a 90$(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
fee732e5 91 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
8406a53a 92$(objpfx)tst-gettext5.out: tst-gettext5.sh $(objpfx)tst-gettext5
fee732e5 93 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
2ecc7d93
UD
94$(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
95 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
7d4de961 96endif
955ebce4 97endif
abbffdf9
UD
98
99$(objpfx)msgs.h: po2test.sed ../po/de.po
4974d2b2 100 $(make-target-directory)
40c90e00 101 LC_ALL=C sed -f $^ > $@
abbffdf9
UD
102
103CFLAGS-tst-gettext.c = -DTESTSTRS_H=\"$(objpfx)msgs.h\"
a334319f 104CFLAGS-tst-translit.c = -DOBJPFX=\"$(objpfx)\"
9a79284e 105CFLAGS-tst-gettext2.c = -DOBJPFX=\"$(objpfx)\"
c44a663d 106CFLAGS-tst-codeset.c = -DOBJPFX=\"$(objpfx)\"
9a79284e 107CFLAGS-tst-gettext3.c = -DOBJPFX=\"$(objpfx)\"
8406a53a
UD
108CFLAGS-tst-gettext4.c = -DOBJPFX=\"$(objpfx)\"
109CFLAGS-tst-gettext5.c = -DOBJPFX=\"$(objpfx)\"
2ecc7d93 110CFLAGS-tst-gettext6.c = -DOBJPFX=\"$(objpfx)\"
8406a53a
UD
111
112ifeq ($(have-thread-library),yes)
113ifeq (yes,$(build-shared))
114$(addprefix $(objpfx),$(multithread-test-srcs)): $(shared-thread-library)
115else
116$(addprefix $(objpfx),$(multithread-test-srcs)): $(static-thread-library)
117endif
118ifeq (yes,$(build-bounded))
119$(multithread-test-srcs:%=$(objpfx)%-bp): $(bounded-thread-library)
120endif
121endif
abbffdf9 122
c6df09ad 123$(objpfx)tst-translit.out: $(objpfx)tst-gettext.out
8f13e320
UD
124$(objpfx)tst-gettext2.out: $(objpfx)tst-gettext.out
125$(objpfx)tst-codeset.out: $(objpfx)tst-gettext.out
9a79284e 126$(objpfx)tst-gettext3.out: $(objpfx)tst-gettext.out
8406a53a
UD
127$(objpfx)tst-gettext4.out: $(objpfx)tst-gettext.out
128$(objpfx)tst-gettext5.out: $(objpfx)tst-gettext.out
2ecc7d93 129$(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
c6df09ad 130
4a4d50f3 131CPPFLAGS += -D'LOCALEDIR="$(msgcatdir)"' \
835bf8e0 132 -D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
ae113383 133BISONFLAGS = --yacc --name-prefix=__gettext --output
7a12c6bb 134
4a33c2f5 135$(inst_msgcatdir)/locale.alias: locale.alias $(+force)
7a12c6bb 136 $(do-install)