]> git.ipfire.org Git - thirdparty/glibc.git/blame - sysdeps/gnu/Makefile
Replace FSF snail mail address with URLs.
[thirdparty/glibc.git] / sysdeps / gnu / Makefile
CommitLineData
92963737 1# Copyright (C) 1996,1997,1998,1999,2001,2002,2003,2004,2005,2006,2010,2011
05d3d580 2# Free Software Foundation, Inc.
b25ae9c6
RM
3# This file is part of the GNU C Library.
4
5# The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6# modify it under the terms of the GNU Lesser General Public
7# License as published by the Free Software Foundation; either
8# version 2.1 of the License, or (at your option) any later version.
b25ae9c6
RM
9
10# The GNU C Library is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13# Lesser General Public License for more details.
b25ae9c6 14
41bdb6e2 15# You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
16# License along with the GNU C Library; if not, see
17# <http://www.gnu.org/licenses/>.
b25ae9c6
RM
18
19# Generate the list of strings for errno codes from the section of the
20# manual which documents the codes.
21
22$(..)sysdeps/gnu/errlist.c: $(..)sysdeps/gnu/errlist.awk \
23 $(..)manual/errno.texi
5aa8ff62 24 $(AWK) -f $^ > $@-tmp
b25ae9c6
RM
25# Make it unwritable so noone will edit it by mistake.
26 -chmod a-w $@-tmp
27 mv -f $@-tmp $@
8619129f 28
5fe14d96
UD
29ifeq ($(subdir),stdio-common)
30
e0a3ed4f 31errlist-c = $(firstword $(wildcard $(addsuffix /errlist.c,$(sysdirs) .)))
fc3480d3 32
605decc1 33ifeq ($(versioning),yes)
fc3480d3 34$(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
05d3d580 35 $(common-objpfx)Versions.v.i $(before-compile)
64b6a1a4 36else
fc3480d3 37$(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
05d3d580 38 $(before-compile)
64b6a1a4 39endif
faef34d0 40 $(make-target-directory)
4022d8ed
RM
41 $(AWK) -v maxerr=`\
42 $(CC) -S $(CPPFLAGS) $(CFLAGS) -DNOT_IN_libc -DEMIT_ERR_MAX $< -o - \
43 | sed -n 's/^.*@@@[^0-9]*\([0-9]*\)[^0-9]*@@@.*$$/\1/p'` \
5fe14d96 44 -f $(..)sysdeps/gnu/errlist-compat.awk \
e0a3ed4f 45 $(wildcard $(sysdirs:=/Versions)) > $@T
4022d8ed
RM
46# Make it unwritable so noone will edit it by mistake.
47 -chmod a-w $@T
48 mv -f $@T $@
4b359a27
RM
49$(objpfx)errlist-compat.h: $(objpfx)errlist-compat.c
50 sed -n '1p;/ERR_MAX/p' $< > $@T
51 -chmod a-w $@T
52 mv -f $@T $@
53generated += errlist-compat.c errlist-compat.h
4022d8ed 54
4022d8ed 55# This will force the generation above to happy if need be.
e0a3ed4f
RM
56$(foreach o,$(object-suffixes) $(object-suffixes:=.d),\
57 $(objpfx)errlist$o): $(objpfx)errlist-compat.h
4022d8ed
RM
58endif
59
8619129f
UD
60ifeq ($(subdir),login)
61sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
92963737 62 pututxline utmpxname updwtmpx getutmpx getutmp
8619129f
UD
63
64sysdep_headers += utmpx.h bits/utmpx.h
65endif
59cacc81
RM
66
67
68ifeq ($(subdir),inet)
69sysdep_headers += netinet/udp.h netinet/ip_icmp.h
70endif
67afae58
RM
71
72
73ifeq ($(subdir),misc)
74sysdep_headers += sys/mtio.h
75endif
f571a994
RM
76
77
78ifeq ($(subdir),csu)
79routines += unwind-resume
80shared-only-routines += unwind-resume
81CFLAGS-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables
82endif
83
84ifeq ($(subdir),rt)
85librt-sysdep_routines += rt-unwind-resume
86librt-shared-only-routines += rt-unwind-resume
87CFLAGS-rt-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables
88endif