PowerPC: modf optimization fix
[glibc.git] / intl / Makefile
blobc2a169807d992e3793aa11c3e2439e5ac291fb1e
1 # Copyright (C) 1995-2012 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, see
16 # <http://www.gnu.org/licenses/>.
18 # Makefile for intl subdirectory: message handling code from GNU gettext.
20 subdir = intl
21 headers = libintl.h
22 routines = bindtextdom dcgettext dgettext gettext \
23 dcigettext dcngettext dngettext ngettext \
24 finddomain loadmsgcat localealias textdomain
25 aux = l10nflist explodename plural plural-exp hash-string
27 include ../Makeconfig
29 multithread-test-srcs := tst-gettext4 tst-gettext5 tst-gettext6
30 test-srcs := tst-gettext tst-translit tst-gettext2 tst-codeset tst-gettext3
31 ifeq ($(have-thread-library),yes)
32 test-srcs += $(multithread-test-srcs)
33 endif
34 tests = tst-ngettext
36 before-compile = $(objpfx)msgs.h
38 install-others = $(inst_msgcatdir)/locale.alias
40 generated = msgs.h mtrace-tst-gettext tst-gettext.mtrace
41 generated-dirs := domaindir localedir
43 ifneq (no,$(BISON))
44 plural.c: plural.y
45 $(BISON) $(BISONFLAGS) $@ $^
46 endif
47 $(objpfx)plural.o: plural.c
49 include ../Rules
51 ifeq ($(run-built-tests),yes)
52 ifeq (yes,$(build-shared))
53 ifneq ($(strip $(MSGFMT)),:)
54 tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \
55 $(objpfx)tst-codeset.out $(objpfx)tst-gettext3.out
56 ifeq ($(have-thread-library),yes)
57 tests: $(objpfx)tst-gettext4.out $(objpfx)tst-gettext5.out \
58 $(objpfx)tst-gettext6.out
59 endif
60 ifneq (no,$(PERL))
61 tests: $(objpfx)mtrace-tst-gettext
62 endif
63 endif
65 # Multiple tests use this data. Create it once to avoid racing and
66 # spurious test failures.
67 codeset_mo = $(objpfx)domaindir/de_DE/LC_MESSAGES/codeset.mo
69 $(codeset_mo): tstcodeset.po
70 $(make-target-directory)
71 msgfmt -o $@T $<
72 mv -f $@T $@
74 $(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
75 $(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
76 $(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
77 $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
78 $(common-objpfx)intl/ $(objpfx)tst-gettext.mtrace
79 $(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
80 $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
81 $(common-objpfx)intl/
82 $(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
83 $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' \
84 $(common-objpfx)intl/
85 $(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
86 $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
87 $(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
88 $(SHELL) $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
90 $(objpfx)tst-codeset.out: $(codeset_mo)
91 $(objpfx)tst-gettext3.out: $(codeset_mo)
92 $(objpfx)tst-gettext5.out: $(codeset_mo)
93 endif
94 endif
96 $(objpfx)msgs.h: po2test.awk ../po/de.po
97 $(make-target-directory)
98 LC_ALL=C $(AWK) -f $^ > $@
100 CFLAGS-tst-gettext.c = -DTESTSTRS_H=\"$(objpfx)msgs.h\"
101 CFLAGS-tst-translit.c = -DOBJPFX=\"$(objpfx)\"
102 CFLAGS-tst-gettext2.c = -DOBJPFX=\"$(objpfx)\"
103 CFLAGS-tst-codeset.c = -DOBJPFX=\"$(objpfx)\"
104 CFLAGS-tst-gettext3.c = -DOBJPFX=\"$(objpfx)\"
105 CFLAGS-tst-gettext4.c = -DOBJPFX=\"$(objpfx)\"
106 CFLAGS-tst-gettext5.c = -DOBJPFX=\"$(objpfx)\"
107 CFLAGS-tst-gettext6.c = -DOBJPFX=\"$(objpfx)\"
109 LOCPATH-ENV = LOCPATH=$(common-objpfx)localedata
110 tst-codeset-ENV = $(LOCPATH-ENV)
111 tst-gettext3-ENV = $(LOCPATH-ENV)
112 tst-gettext5-ENV = $(LOCPATH-ENV)
114 ifeq ($(have-thread-library),yes)
115 ifeq (yes,$(build-shared))
116 $(addprefix $(objpfx),$(multithread-test-srcs)): $(shared-thread-library)
117 else
118 $(addprefix $(objpfx),$(multithread-test-srcs)): $(static-thread-library)
119 endif
120 ifeq (yes,$(build-bounded))
121 $(multithread-test-srcs:%=$(objpfx)%-bp): $(bounded-thread-library)
122 endif
123 endif
125 $(objpfx)tst-translit.out: $(objpfx)tst-gettext.out
126 $(objpfx)tst-gettext2.out: $(objpfx)tst-gettext.out
127 $(objpfx)tst-codeset.out: $(objpfx)tst-gettext.out
128 $(objpfx)tst-gettext3.out: $(objpfx)tst-gettext.out
129 $(objpfx)tst-gettext4.out: $(objpfx)tst-gettext.out
130 $(objpfx)tst-gettext5.out: $(objpfx)tst-gettext.out
131 $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
133 CPPFLAGS += -D'LOCALEDIR="$(msgcatdir)"' \
134 -D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
135 BISONFLAGS = --yacc --name-prefix=__gettext --output
137 $(inst_msgcatdir)/locale.alias: locale.alias $(+force)
138 $(do-install)