]> git.ipfire.org Git - thirdparty/glibc.git/blame - string/Makefile
Clean up trivially redundant __USE_MISC conditionals.
[thirdparty/glibc.git] / string / Makefile
CommitLineData
d4697bc9 1# Copyright (C) 1991-2014 Free Software Foundation, Inc.
28f540f4
RM
2# This file is part of the GNU C Library.
3
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.
28f540f4
RM
8
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.
28f540f4 13
41bdb6e2 14# You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15# License along with the GNU C Library; if not, see
16# <http://www.gnu.org/licenses/>.
28f540f4
RM
17
18#
19# Sub-makefile for string portion of library.
20#
21subdir := string
22
478b92f0 23headers := string.h strings.h memory.h endian.h bits/endian.h \
f8887d0a
L
24 argz.h envz.h byteswap.h bits/byteswap.h bits/byteswap-16.h \
25 bits/string.h bits/string2.h bits/string3.h
28f540f4 26
0501d603
UD
27routines := strcat strchr strcmp strcoll strcpy strcspn \
28 strverscmp strdup strndup \
310b3460 29 strerror _strerror strlen strnlen \
8d71c7b0 30 strncat strncmp strncpy \
28f540f4 31 strrchr strpbrk strsignal strspn strstr strtok \
59dd8641 32 strtok_r strxfrm memchr memcmp memmove memset \
bdd421cc 33 mempcpy bcopy bzero ffs ffsll stpcpy stpncpy \
0501d603 34 strcasecmp strncase strcasecmp_l strncase_l \
f4017d20 35 memccpy memcpy wordcopy strsep strcasestr \
c4563d2d 36 swab strfry memfrob memmem rawmemchr strchrnul \
7a12c6bb 37 $(addprefix argz-,append count create ctsep next \
dbc676d4 38 delete extract insert stringify \
d705269e 39 addsep replace) \
c84142e8 40 envz basename \
61645263 41 strcoll_l strxfrm_l string-inlines memrchr \
4a44ce79 42 xpg-strerror strerror_l
28f540f4 43
762011fe 44strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \
cd94eda9 45 stpcpy stpncpy strcat strchr strcmp strcpy strcspn \
dbc676d4 46 strlen strncmp strncpy strpbrk strrchr strspn memmem \
6f0eec67 47 strstr strcasestr strnlen strcasecmp strncasecmp \
4660856c 48 strncat rawmemchr strchrnul bcopy bzero memrchr
61eb22d3 49tests := tester inl-tester noinl-tester testcopy test-ffs \
9c3b1ceb 50 tst-strlen stratcliff tst-svc tst-inlcall \
b716cb4e 51 bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
806bc96a 52 tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \
9009e8f8 53 bug-strtok1 $(addprefix test-,$(strop-tests)) \
67a67b95 54 bug-envz1 tst-strxfrm2 tst-endian tst-svc2 \
03759f47 55 tst-strtok_r
28f540f4 56
303e567a
SP
57xtests = tst-strcoll-overflow
58
28f540f4 59include ../Rules
59dd8641
RM
60
61tester-ENV = LANGUAGE=C
9a0a462c 62inl-tester-ENV = LANGUAGE=C
4547c1a4 63noinl-tester-ENV = LANGUAGE=C
e7f21fa6 64tst-strxfrm-ENV = LOCPATH=$(common-objpfx)localedata
df859a0c 65tst-strxfrm2-ENV = LOCPATH=$(common-objpfx)localedata
c51dc068 66bug-strcoll1-ENV = LOCPATH=$(common-objpfx)localedata
45b8accc
AS
67test-strcasecmp-ENV = LOCPATH=$(common-objpfx)localedata
68test-strncasecmp-ENV = LOCPATH=$(common-objpfx)localedata
359157a5 69CFLAGS-inl-tester.c = -fno-builtin
4547c1a4 70CFLAGS-noinl-tester.c = -fno-builtin
9a0a462c
UD
71CFLAGS-tst-strlen.c = -fno-builtin
72CFLAGS-stratcliff.c = -fno-builtin
b301e2eb 73CFLAGS-test-ffs.c = -fno-builtin
359157a5 74CFLAGS-tst-inlcall.c = -fno-builtin
1f205a47 75
03ac099f 76ifeq ($(run-built-tests),yes)
1f205a47 77tests: $(objpfx)tst-svc.out
be608049
AJ
78$(objpfx)tst-svc.out: tst-svc.input $(objpfx)tst-svc
79 GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \
740b3dbe 80 $(test-program-cmd) < $(word 1,$^) > $@
4bcb2658 81 @cmp tst-svc.expect $(objpfx)tst-svc.out
e7a95dc6 82endif