Remove spurious '.' in math/libm-test.inc comment.
[glibc.git] / intl / Makefile
blobfc6af4446a02558e78f43acce3dcc718fb6a0e5a
1 # Copyright (C) 1995-2003,2005,2008,2011,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 (no,$(cross-compiling))
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
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 $(objpfx)tst-gettext3.out: tst-gettext3.sh $(objpfx)tst-gettext3
76 $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
77 $(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
78 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
79 $(objpfx)tst-gettext5.out: tst-gettext5.sh $(objpfx)tst-gettext5
80 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
81 $(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
82 $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
83 endif
84 endif
86 $(objpfx)msgs.h: po2test.sed ../po/de.po
87 $(make-target-directory)
88 LC_ALL=C sed -f $^ > $@
90 CFLAGS-tst-gettext.c = -DTESTSTRS_H=\"$(objpfx)msgs.h\"
91 CFLAGS-tst-translit.c = -DOBJPFX=\"$(objpfx)\"
92 CFLAGS-tst-gettext2.c = -DOBJPFX=\"$(objpfx)\"
93 CFLAGS-tst-codeset.c = -DOBJPFX=\"$(objpfx)\"
94 CFLAGS-tst-gettext3.c = -DOBJPFX=\"$(objpfx)\"
95 CFLAGS-tst-gettext4.c = -DOBJPFX=\"$(objpfx)\"
96 CFLAGS-tst-gettext5.c = -DOBJPFX=\"$(objpfx)\"
97 CFLAGS-tst-gettext6.c = -DOBJPFX=\"$(objpfx)\"
99 ifeq ($(have-thread-library),yes)
100 ifeq (yes,$(build-shared))
101 $(addprefix $(objpfx),$(multithread-test-srcs)): $(shared-thread-library)
102 else
103 $(addprefix $(objpfx),$(multithread-test-srcs)): $(static-thread-library)
104 endif
105 ifeq (yes,$(build-bounded))
106 $(multithread-test-srcs:%=$(objpfx)%-bp): $(bounded-thread-library)
107 endif
108 endif
110 $(objpfx)tst-translit.out: $(objpfx)tst-gettext.out
111 $(objpfx)tst-gettext2.out: $(objpfx)tst-gettext.out
112 $(objpfx)tst-codeset.out: $(objpfx)tst-gettext.out
113 $(objpfx)tst-gettext3.out: $(objpfx)tst-gettext.out
114 $(objpfx)tst-gettext4.out: $(objpfx)tst-gettext.out
115 $(objpfx)tst-gettext5.out: $(objpfx)tst-gettext.out
116 $(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
118 CPPFLAGS += -D'LOCALEDIR="$(msgcatdir)"' \
119 -D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
120 BISONFLAGS = --yacc --name-prefix=__gettext --output
122 $(inst_msgcatdir)/locale.alias: locale.alias $(+force)
123 $(do-install)