]> git.ipfire.org Git - thirdparty/glibc.git/blame - posix/Makefile
(generated): Add iconv-test.xxx.
[thirdparty/glibc.git] / posix / Makefile
CommitLineData
0c7dfa14 1# Copyright (C) 1991-1999, 2000, 2001 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
5# modify it under the terms of the GNU Library General Public License as
6# published by the Free Software Foundation; either version 2 of the
7# License, or (at your option) any later version.
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
12# Library General Public License for more details.
13
14# You should have received a copy of the GNU Library General Public
d38cd08c
UD
15# License along with the GNU C Library; see the file COPYING.LIB. If not,
16# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17# Boston, MA 02111-1307, USA.
28f540f4
RM
18
19#
20# Sub-makefile for POSIX portion of the library.
21#
22subdir := posix
23
7b3547eb 24headers := sys/utsname.h sys/times.h sys/wait.h sys/types.h unistd.h \
5107cf1d 25 glob.h regex.h wordexp.h fnmatch.h bits/types.h getopt.h \
e8c6a442 26 bits/posix1_lim.h bits/posix2_lim.h bits/posix_opt.h \
5107cf1d
UD
27 bits/local_lim.h tar.h bits/utsname.h bits/confname.h \
28 bits/waitflags.h bits/waitstatus.h sys/unistd.h sched.h \
d1462d2e 29 bits/sched.h re_comp.h wait.h bits/environments.h cpio.h \
a5a6f926 30 sys/sysmacros.h spawn.h
28f540f4 31
61eb22d3 32distribute := confstr.h TESTS TESTS2C.sed testcases.h \
92040cbc 33 PTESTS PTESTS2C.sed ptestcases.h \
a5a6f926
UD
34 globtest.c globtest.sh wordexp-tst.sh annexc.c fnmatch_loop.c \
35 spawn_int.h
28f540f4
RM
36
37routines := \
38 uname \
39 times \
bd355af0 40 wait waitpid wait3 wait4 waitid \
7b3547eb 41 alarm sleep pause nanosleep \
e8c6a442 42 fork vfork _exit \
28f540f4
RM
43 execve fexecve execv execle execl execvp execlp \
44 getpid getppid \
3bbceb12 45 getuid geteuid getgid getegid getgroups setuid setgid group_member \
0d8733c4 46 getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \
ee188d55 47 getlogin getlogin_r setlogin \
28f540f4 48 pathconf sysconf fpathconf \
a5f4e34a 49 glob glob64 fnmatch regex \
28f540f4 50 confstr \
7cc27f44 51 getopt getopt1 getopt_init \
7b3547eb 52 sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax \
46ec036d 53 sched_primin sched_rr_gi \
a5a0310d 54 getaddrinfo gai_strerror wordexp \
a5a6f926
UD
55 pread pwrite pread64 pwrite64 \
56 spawn_faction_init spawn_faction_destroy spawn_faction_addclose \
57 spawn_faction_addopen spawn_faction_adddup2 \
58 spawnattr_init spawnattr_destroy \
59 spawnattr_getdefault spawnattr_setdefault \
60 spawnattr_getflags spawnattr_setflags \
afa0569f
UD
61 spawnattr_getpgroup spawnattr_setpgroup spawn spawnp spawni \
62 spawnattr_getsigmask spawnattr_getschedpolicy spawnattr_getschedparam \
63 spawnattr_setsigmask spawnattr_setschedpolicy spawnattr_setschedparam
7b3547eb 64
7cabd57c
UD
65include ../Makeconfig
66
5f9e57ba 67aux := init-posix environ
df455ccb 68tests := tstgetopt testfnm runtests runptests \
bd9df4cd 69 tst-preadwrite tst-preadwrite64 test-vfork regexbug1 \
ad92208d 70 tst-getlogin tst-mmap tst-getaddrinfo tst-truncate \
726b7b0f 71 tst-truncate64 tst-fork tst-fnmatch tst-regexloc tst-dir \
2d0aea11 72 tst-chmod bug-regex1 bug-regex2 bug-regex3 tst-gnuglob
df455ccb 73ifeq (yes,$(build-shared))
2604afb1 74test-srcs := globtest
e8c6a442 75tests += wordexp-test tst-exec tst-spawn
df455ccb 76endif
28f540f4
RM
77others := getconf
78install-bin := getconf
2b83a2a4 79gpl2lgpl := getopt.c getopt1.c getopt.h regex.c regex.h
28f540f4 80
92040cbc 81before-compile := testcases.h ptestcases.h
4cca6b86 82
414fd335 83# So they get cleaned up.
ba9234d9 84generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
3b526f89 85 annexc annexc.out wordexp-tst.out
414fd335 86
28f540f4
RM
87include ../Rules
88
e1e3ba54 89ifeq (yes,$(build-static-nss))
8f3f1e09
UD
90# We need it for "make check" only. We can skip them if they haven't
91# been built yet during "make".
92otherlibs += $(wildcard $(nssobjdir)/libnss_files.a \
93 $(resolvobjdir)/libnss_dns.a \
94 $(resolvobjdir)/libresolv.a)
95endif
96
61eb22d3 97ifeq (no,$(cross-compiling))
df455ccb
AS
98# globtest and wordexp-test currently only works with shared libraries
99ifeq (yes,$(build-shared))
3f36c563
UD
100tests: $(objpfx)globtest.out $(objpfx)wordexp-tst.out
101$(objpfx)globtest.out: globtest.sh $(objpfx)globtest
31161268
UD
102 $(SHELL) -e globtest.sh $(common-objpfx) $(elf-objpfx) \
103 $(rtld-installed-name)
3f36c563 104$(objpfx)wordexp-tst.out: wordexp-tst.sh $(objpfx)wordexp-test
31161268
UD
105 $(SHELL) -e wordexp-tst.sh $(common-objpfx) $(elf-objpfx) \
106 $(rtld-installed-name)
61eb22d3 107endif
df455ccb 108endif
61eb22d3 109
0c7dfa14 110CFLAGS-regex.c = -Wno-strict-prototypes -DMBS_SUPPORT
46ec036d 111CFLAGS-getaddrinfo.c = -DRESOLVER
e25054c4 112tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
b64cd08a 113 --none random --col --color --colour
0793d348 114
079199de 115tst-exec-ARGS = -- $(built-program-cmd)
08c7f6b0 116tst-spawn-ARGS = -- $(built-program-cmd)
53e5cdd8 117tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir
55f462ed 118tst-chmod-ARGS = `pwd`
079199de 119
0d6af3a8 120tst-fnmatch-ENV = LOCPATH=$(common-objpfx)localedata
47b853e8 121tst-regexloc-ENV = LOCPATH=$(common-objpfx)localedata
5c0111e9 122bug-regex1-ENV = LOCPATH=$(common-objpfx)localedata
0d6af3a8 123
4cca6b86
UD
124testcases.h: TESTS TESTS2C.sed
125 sed -f TESTS2C.sed < $< > $@T
126 mv -f $@T $@
880f421f 127ifeq ($(with-cvs),yes)
4eb36693 128 test ! -d CVS || cvs $(CVSOPTS) commit -mRegenerated $@
880f421f 129endif
92040cbc
UD
130
131ptestcases.h: PTESTS PTESTS2C.sed
132 sed -f PTESTS2C.sed < $< > $@T
133 mv -f $@T $@
134ifeq ($(with-cvs),yes)
135 test ! -d CVS || cvs $(CVSOPTS) commit -mRegenerated $@
136endif
4959e310
UD
137
138# Run a test on the header files we use.
139# XXX Please note that for now we ignore the result of this test.
b647f210
AJ
140tests: $(objpfx)annexc.out
141ifeq (no,$(cross-compiling))
142tests:$(objpfx)bug-regex2-mem
143endif
144
3f36c563 145$(objpfx)annexc.out: $(objpfx)annexc
8eaaffde 146 -$(dir $<)$(notdir $<) '$(CC)' \
3c26cf28 147 '-I../include -I.. $(+sysdep-includes) $(sysincludes)' > $@
4959e310
UD
148
149$(objpfx)annexc: annexc.c
150 $(native-compile)
770d454d
UD
151
152bug-regex2-ENV = MALLOC_TRACE=$(objpfx)bug-regex2.mtrace
153
154$(objpfx)bug-regex2-mem: $(objpfx)bug-regex2.out
155 $(common-objpfx)malloc/mtrace $(objpfx)bug-regex2.mtrace > $@