Update.
[glibc.git] / sysdeps / gnu / Makefile
blob661d5f875291b53cf90bf5792901607ebc6283d7
1 # Copyright (C) 1996,97,98,99,2001,02 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library.
4 # The GNU C Library is free software; you can redistribute it and/or
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.
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 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with the GNU C Library; if not, write to the Free
16 # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
17 # 02111-1307 USA.
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 $@
28 ifeq ($(with-cvs),yes)
29 test ! -d CVS || cvs commit -m'Regenerated from $^' $@
30 endif
32 ifeq ($(subdir),stdio-common)
34 vpath errlist.c $(full_config_sysdirs)
35 ifeq ($(versioning),yes)
36 $(objpfx)errlist-compat.c: errlist.c $(..)sysdeps/gnu/errlist-compat.awk \
37 $(common-objpfx)Versions.v.i
38 else
39 $(objpfx)errlist-compat.c: errlist.c $(..)sysdeps/gnu/errlist-compat.awk
40 endif
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 $(patsubst %,$(..)%/Versions,\
46 $(config-sysdirs) $(add-ons))) > $@T
47 # Make it unwritable so noone will edit it by mistake.
48 -chmod a-w $@T
49 mv -f $@T $@
51 # This will force the generation above to happy if need be.
52 $(objpfx)errlist.d: $(objpfx)errlist-compat.c
53 endif
55 ifeq ($(subdir),login)
56 sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
57 pututxline utmpxname updwtmpx getutmpx getutmp
59 sysdep_headers += utmpx.h bits/utmpx.h
60 endif
63 ifeq ($(subdir),inet)
64 sysdep_headers += netinet/udp.h netinet/ip_icmp.h
65 endif
68 ifeq ($(subdir),misc)
69 sysdep_headers += sys/mtio.h
70 endif
73 ifeq ($(subdir),dlfcn)
74 libdl-sysdep_routines += eval
75 endif