stdlib/strfrom: Add copysign to fix NAN issue on riscv (BZ #29501)
[glibc.git] / catgets / Makefile
blob27b30b23959cdc7e2d1d13847fc3689c24347210
1 # Copyright (C) 1996-2022 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 # <https://www.gnu.org/licenses/>.
19 # Makefile for catgets.
21 subdir := catgets
23 include ../Makeconfig
25 headers = nl_types.h
26 routines = catgets open_catalog
27 others = gencat
28 install-bin = gencat
29 extra-objs = $(gencat-modules:=.o)
31 tests = tst-catgets
32 test-srcs = test-gencat
34 ifeq ($(run-built-tests),yes)
35 tests-special += $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \
36 $(objpfx)sample.SJIS.cat $(objpfx)test-gencat.out
37 tests-special += $(objpfx)tst-catgets-mem.out
38 endif
40 gencat-modules = xmalloc
41 others-extras = $(gencat-modules)
43 # To find xmalloc.c
44 vpath %.c ../locale/programs
47 include ../Rules
49 $(objpfx)gencat: $(gencat-modules:%=$(objpfx)%.o)
51 catgets-CPPFLAGS := -DNLSPATH='"$(localedir)/%L/%N:$(localedir)/%L/LC_MESSAGES/%N:$(localedir)/%l/%N:$(localedir)/%l/LC_MESSAGES/%N:"'
53 generated += de.msg test1.cat test1.h test2.cat test2.h sample.SJIS.cat \
54 test-gencat.h
55 generated += tst-catgets.mtrace tst-catgets-mem.out
57 generated-dirs += de
59 tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de \
60 MALLOC_TRACE=$(objpfx)tst-catgets.mtrace \
61 LD_PRELOAD=$(common-objpfx)/malloc/libc_malloc_debug.so
63 ifeq ($(run-built-tests),yes)
64 # This test just checks whether the program produces any error or not.
65 # The result is not tested.
66 $(objpfx)test1.cat: test1.msg $(objpfx)gencat
67 $(built-program-cmd-before-env) \
68 $(run-program-env) LC_ALL=hr_HR.ISO-8859-2 \
69 $(built-program-cmd-after-env) -H $(objpfx)test1.h $@ $<; \
70 $(evaluate-test)
71 $(objpfx)test2.cat: test2.msg $(objpfx)gencat
72 $(built-program-cmd) -H $(objpfx)test2.h $@ $<; \
73 $(evaluate-test)
74 $(objpfx)de/libc.cat: $(objpfx)de.msg $(objpfx)gencat
75 $(make-target-directory)
76 $(built-program-cmd-before-env) \
77 $(run-program-env) LC_ALL=de_DE.ISO-8859-1 \
78 $(built-program-cmd-after-env) $@ $<; \
79 $(evaluate-test)
80 $(objpfx)tst-catgets.out: $(objpfx)de/libc.cat
82 # Generate a non-simple input file.
83 $(objpfx)de.msg: xopen-msg.awk $(..)po/de.po
84 LC_ALL=C $(AWK) -f $^ $< > $@
86 $(objpfx)test-gencat.out: test-gencat.sh $(objpfx)test-gencat \
87 $(objpfx)sample.SJIS.cat
88 $(SHELL) $< $(common-objpfx) '$(test-program-cmd-before-env)' \
89 '$(run-program-env)' '$(test-program-cmd-after-env)'; \
90 $(evaluate-test)
92 $(objpfx)sample.SJIS.cat: sample.SJIS $(objpfx)gencat
93 $(built-program-cmd) -H $(objpfx)test-gencat.h < $(word 1,$^) > $@; \
94 $(evaluate-test)
96 $(objpfx)tst-catgets-mem.out: $(objpfx)tst-catgets.out
97 $(common-objpfx)malloc/mtrace $(objpfx)tst-catgets.mtrace > $@; \
98 $(evaluate-test)
99 endif