Add missing magic to GLIBC_PROVIDES.
[glibc.git] / sysdeps / gnu / Makefile
blob269c74f384b2f755c707047cb09f2ff31c2a3725
1 # Copyright (C) 1996,1997,1998,1999,2001,2002,2003,2004,2005,2006,2010,2011
2 # Free Software Foundation, Inc.
3 # This file is part of the GNU C Library.
5 # The GNU C Library is free software; you can redistribute it and/or
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.
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
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with the GNU C Library; if not, see
17 # <http://www.gnu.org/licenses/>.
19 # Generate the list of strings for errno codes from the section of the
20 # manual which documents the codes.
22 $(..)sysdeps/gnu/errlist.c: $(..)sysdeps/gnu/errlist.awk \
23 $(..)manual/errno.texi
24 $(AWK) -f $^ > $@-tmp
25 # Make it unwritable so noone will edit it by mistake.
26 -chmod a-w $@-tmp
27 mv -f $@-tmp $@
29 ifeq ($(subdir),stdio-common)
31 errlist-c = $(firstword $(wildcard $(addsuffix /errlist.c,$(sysdirs) .)))
33 ifeq ($(versioning),yes)
34 $(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
35 $(common-objpfx)Versions.v.i $(before-compile)
36 else
37 $(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
38 $(before-compile)
39 endif
40 $(make-target-directory)
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'` \
44 -f $(..)sysdeps/gnu/errlist-compat.awk \
45 $(wildcard $(sysdirs:=/Versions)) > $@T
46 # Make it unwritable so noone will edit it by mistake.
47 -chmod a-w $@T
48 mv -f $@T $@
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 $@
53 generated += errlist-compat.c errlist-compat.h
55 # This will force the generation above to happy if need be.
56 $(foreach o,$(object-suffixes) $(object-suffixes:=.d),\
57 $(objpfx)errlist$o): $(objpfx)errlist-compat.h
58 endif
60 ifeq ($(subdir),login)
61 sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
62 pututxline utmpxname updwtmpx getutmpx getutmp
64 sysdep_headers += utmpx.h bits/utmpx.h
65 endif
68 ifeq ($(subdir),inet)
69 sysdep_headers += netinet/udp.h netinet/ip_icmp.h
70 endif
73 ifeq ($(subdir),misc)
74 sysdep_headers += sys/mtio.h
75 endif
78 ifeq ($(subdir),csu)
79 routines += unwind-resume
80 shared-only-routines += unwind-resume
81 CFLAGS-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables
82 endif
84 ifeq ($(subdir),rt)
85 librt-sysdep_routines += rt-unwind-resume
86 librt-shared-only-routines += rt-unwind-resume
87 CFLAGS-rt-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables
88 endif