]> sourceware.org Git - glibc.git/blame - posix/Makefile
Update.
[glibc.git] / posix / Makefile
CommitLineData
d0ab7780 1# Copyright (C) 1991,92,93,94,95,96,97,98,99 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
UD
25 glob.h regex.h wordexp.h fnmatch.h bits/types.h getopt.h \
26 bits/posix1_lim.h bits/posix2_lim.h bits/posix_opt.h \
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
UD
29 bits/sched.h re_comp.h wait.h bits/environments.h cpio.h \
30 sys/sysmacros.h
28f540f4 31
61eb22d3 32distribute := confstr.h TESTS TESTS2C.sed testcases.h \
92040cbc 33 PTESTS PTESTS2C.sed ptestcases.h \
ba9234d9 34 globtest.c globtest.sh wordexp-tst.sh annexc.c
28f540f4
RM
35
36routines := \
37 uname \
38 times \
bd355af0 39 wait waitpid wait3 wait4 waitid \
7b3547eb 40 alarm sleep pause nanosleep \
28f540f4
RM
41 fork vfork _exit \
42 execve fexecve execv execle execl execvp execlp \
43 getpid getppid \
3bbceb12 44 getuid geteuid getgid getegid getgroups setuid setgid group_member \
0d8733c4 45 getpgid setpgid getpgrp bsd-getpgrp setpgrp getsid setsid \
ee188d55 46 getlogin getlogin_r setlogin \
28f540f4 47 pathconf sysconf fpathconf \
a5f4e34a 48 glob glob64 fnmatch regex \
28f540f4 49 confstr \
7cc27f44 50 getopt getopt1 getopt_init \
7b3547eb 51 sched_setp sched_getp sched_sets sched_gets sched_yield sched_primax \
46ec036d 52 sched_primin sched_rr_gi \
a5a0310d 53 getaddrinfo gai_strerror wordexp \
dfd2257a 54 pread pwrite pread64 pwrite64
7b3547eb 55
7cabd57c
UD
56include ../Makeconfig
57
5f9e57ba 58aux := init-posix environ
df455ccb 59tests := tstgetopt testfnm runtests runptests \
d0ab7780 60 tst-preadwrite test-vfork
df455ccb 61ifeq (yes,$(build-shared))
2604afb1 62test-srcs := globtest
df455ccb
AS
63tests += wordexp-test
64endif
28f540f4
RM
65others := getconf
66install-bin := getconf
ec986e23 67ifeq (yes,$(build-static))
28f540f4 68install-lib := libposix.a
ec986e23 69endif
2b83a2a4 70gpl2lgpl := getopt.c getopt1.c getopt.h regex.c regex.h
28f540f4 71
92040cbc 72before-compile := testcases.h ptestcases.h
4cca6b86 73
414fd335 74# So they get cleaned up.
ba9234d9 75generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \
8eaaffde 76 annexc annexc.out
414fd335 77
28f540f4
RM
78include ../Rules
79
61eb22d3 80ifeq (no,$(cross-compiling))
df455ccb
AS
81# globtest and wordexp-test currently only works with shared libraries
82ifeq (yes,$(build-shared))
9c1a1da9 83.PHONY: do-globtest do-wordexp-test
31161268
UD
84tests: do-globtest do-wordexp-test
85do-globtest: $(objpfx)globtest
86 $(SHELL) -e globtest.sh $(common-objpfx) $(elf-objpfx) \
87 $(rtld-installed-name)
88do-wordexp-test: $(objpfx)wordexp-test
89 $(SHELL) -e wordexp-tst.sh $(common-objpfx) $(elf-objpfx) \
90 $(rtld-installed-name)
61eb22d3 91endif
df455ccb 92endif
61eb22d3 93
707ac6cb 94CFLAGS-regex.c = -Wno-unused -Wno-strict-prototypes
46ec036d 95CFLAGS-getaddrinfo.c = -DRESOLVER
0793d348 96
28f540f4
RM
97$(objpfx)libposix.a: $(dep-dummy-lib); $(make-dummy-lib)
98lib: $(objpfx)libposix.a
4cca6b86
UD
99
100testcases.h: TESTS TESTS2C.sed
101 sed -f TESTS2C.sed < $< > $@T
102 mv -f $@T $@
880f421f 103ifeq ($(with-cvs),yes)
4eb36693 104 test ! -d CVS || cvs $(CVSOPTS) commit -mRegenerated $@
880f421f 105endif
92040cbc
UD
106
107ptestcases.h: PTESTS PTESTS2C.sed
108 sed -f PTESTS2C.sed < $< > $@T
109 mv -f $@T $@
110ifeq ($(with-cvs),yes)
111 test ! -d CVS || cvs $(CVSOPTS) commit -mRegenerated $@
112endif
28f540f4
RM
113\f
114# Make the standalone glob/fnmatch package.
115
116glob.tar: glob/ChangeLog glob/COPYING.LIB \
117 glob/Makefile.in glob/configure glob/configure.in glob/configure.bat\
3e2632b6 118 glob/SCOPTIONS glob/SMakefile glob/Makefile.ami \
b7843ea9 119 glob/fnmatch.h glob/glob.h glob/fnmatch.c glob/glob.c
28f540f4
RM
120 tar cho$(verbose)f $@ $^
121glob/%.c: %.c
122 rm -f $@
123 ln -s ../$< $@
124glob/%.h: %.h
125 rm -f $@
126 ln -s ../$< $@
127
128glob/configure: glob/configure.in
9b26f5c4 129 cd glob && autoconf $(ACFLAGS)
880f421f 130ifeq ($(with-cvs),yes)
4eb36693 131 test ! -d CVS || cvs $(CVSOPTS) commit -m'Regenerated: autoconf $(ACFLAGS) $<' $@
880f421f 132endif
28f540f4
RM
133
134glob/ChangeLog: ../ChangeLog
135 changelog-extract --regexp 'posix/(glob|fnmatch).*' < $< > $@.new
136 chmod a-w $@.new
137 mv -f $@.new $@
880f421f 138ifeq ($(with-cvs),yes)
4eb36693 139 test ! -d CVS || cvs $(CVSOPTS) commit -mRegenerated $@
880f421f 140endif
28f540f4
RM
141
142%.Z: %
143 compress -c $< > $@-tmp
144 mv $@-tmp $@
145%.gz: %
146 gzip -9v -c $< > $@-tmp
147 mv $@-tmp $@
4959e310
UD
148
149# Run a test on the header files we use.
150# XXX Please note that for now we ignore the result of this test.
151tests: $(objpfx)annexc
8eaaffde
UD
152 -$(dir $<)$(notdir $<) '$(CC)' \
153 '-I../include -I.. $(+sysdep-includes)' > $<.out
4959e310
UD
154
155$(objpfx)annexc: annexc.c
156 $(native-compile)
This page took 0.126594 seconds and 5 git commands to generate.