1 # Copyright (C) 1995-2003, 2005, 2008, 2011 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.
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
26 distribute
= gmo.h gettextP.h hash-string.h loadinfo.h locale.alias \
27 plural.y plural-exp.h plural-eval.c po2test.sed \
29 tst-translit.sh translit.po \
30 tst-gettext2.sh tstlang1.po tstlang2.po \
31 tst-codeset.sh tstcodeset.po \
33 tst-gettext4.sh tst-gettext4-de.po tst-gettext4-fr.po \
34 tst-gettext5.sh tst-gettext6.sh
38 multithread-test-srcs
:= tst-gettext4 tst-gettext5 tst-gettext6
39 test-srcs
:= tst-gettext tst-translit tst-gettext2 tst-codeset tst-gettext3
40 ifeq ($(have-thread-library
),yes
)
41 test-srcs
+= $(multithread-test-srcs
)
45 before-compile
= $(objpfx
)msgs.h
47 install-others
= $(inst_msgcatdir
)/locale.alias
49 generated
= msgs.h mtrace-tst-gettext tst-gettext.mtrace
50 generated-dirs
:= domaindir localedir
54 $(BISON
) $(BISONFLAGS
) $@
$^
56 $(objpfx
)plural.o
: plural.c
60 ifeq (no
,$(cross-compiling
))
61 ifeq (yes
,$(build-shared
))
62 ifneq ($(strip $(MSGFMT
)),:)
63 tests
: $(objpfx
)tst-translit.out
$(objpfx
)tst-gettext2.out \
64 $(objpfx
)tst-codeset.out
$(objpfx
)tst-gettext3.out
65 ifeq ($(have-thread-library
),yes
)
66 tests
: $(objpfx
)tst-gettext4.out
$(objpfx
)tst-gettext5.out \
67 $(objpfx
)tst-gettext6.out
70 tests
: $(objpfx
)mtrace-tst-gettext
73 $(objpfx
)mtrace-tst-gettext
: $(objpfx
)tst-gettext.out
74 $(common-objpfx
)malloc
/mtrace
$(objpfx
)tst-gettext.mtrace
> $@
75 $(objpfx
)tst-gettext.out
: tst-gettext.sh
$(objpfx
)tst-gettext
76 $(SHELL
) -e
$< $(common-objpfx
) $(common-objpfx
)intl
/ \
77 $(objpfx
)tst-gettext.mtrace
78 $(objpfx
)tst-translit.out
: tst-translit.sh
$(objpfx
)tst-translit
79 $(SHELL
) -e
$< $(common-objpfx
) $(common-objpfx
)intl
/
80 $(objpfx
)tst-gettext2.out
: tst-gettext2.sh
$(objpfx
)tst-gettext2
81 $(SHELL
) -e
$< $(common-objpfx
) $(common-objpfx
)intl
/
82 $(objpfx
)tst-codeset.out
: tst-codeset.sh
$(objpfx
)tst-codeset
83 $(SHELL
) -e
$< $(common-objpfx
) $(common-objpfx
)intl
/
84 $(objpfx
)tst-gettext3.out
: tst-gettext3.sh
$(objpfx
)tst-gettext3
85 $(SHELL
) -e
$< $(common-objpfx
) $(common-objpfx
)intl
/
86 $(objpfx
)tst-gettext4.out
: tst-gettext4.sh
$(objpfx
)tst-gettext4
87 $(SHELL
) -e
$< $(common-objpfx
) '$(run-program-prefix)' $(common-objpfx
)intl
/
88 $(objpfx
)tst-gettext5.out
: tst-gettext5.sh
$(objpfx
)tst-gettext5
89 $(SHELL
) -e
$< $(common-objpfx
) '$(run-program-prefix)' $(common-objpfx
)intl
/
90 $(objpfx
)tst-gettext6.out
: tst-gettext6.sh
$(objpfx
)tst-gettext6
91 $(SHELL
) -e
$< $(common-objpfx
) '$(run-program-prefix)' $(common-objpfx
)intl
/
95 $(objpfx
)msgs.h
: po2test.sed ..
/po
/de.po
96 $(make-target-directory
)
97 LC_ALL
=C sed
-f
$^
> $@
99 CFLAGS-tst-gettext.c
= -DTESTSTRS_H
=\"$(objpfx
)msgs.h
\"
100 CFLAGS-tst-translit.c
= -DOBJPFX
=\"$(objpfx
)\"
101 CFLAGS-tst-gettext2.c
= -DOBJPFX
=\"$(objpfx
)\"
102 CFLAGS-tst-codeset.c
= -DOBJPFX
=\"$(objpfx
)\"
103 CFLAGS-tst-gettext3.c
= -DOBJPFX
=\"$(objpfx
)\"
104 CFLAGS-tst-gettext4.c
= -DOBJPFX
=\"$(objpfx
)\"
105 CFLAGS-tst-gettext5.c
= -DOBJPFX
=\"$(objpfx
)\"
106 CFLAGS-tst-gettext6.c
= -DOBJPFX
=\"$(objpfx
)\"
108 ifeq ($(have-thread-library
),yes
)
109 ifeq (yes
,$(build-shared
))
110 $(addprefix $(objpfx
),$(multithread-test-srcs
)): $(shared-thread-library
)
112 $(addprefix $(objpfx
),$(multithread-test-srcs
)): $(static-thread-library
)
114 ifeq (yes
,$(build-bounded
))
115 $(multithread-test-srcs
:%=$(objpfx
)%-bp
): $(bounded-thread-library
)
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 $(objpfx
)tst-gettext6.out
: $(objpfx
)tst-gettext.out
127 CPPFLAGS
+= -D
'LOCALEDIR="$(msgcatdir)"' \
128 -D
'LOCALE_ALIAS_PATH="$(msgcatdir)"'
129 BISONFLAGS
= --yacc --name-prefix
=__gettext
--output
131 $(inst_msgcatdir
)/locale.alias
: locale.alias
$(+force)