|
Packit Service |
82fcde |
# Copyright (C) 1996-2018 Free Software Foundation, Inc.
|
|
Packit Service |
82fcde |
# This file is part of the GNU C Library.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
82fcde |
# modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
# License as published by the Free Software Foundation; either
|
|
Packit Service |
82fcde |
# version 2.1 of the License, or (at your option) any later version.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
82fcde |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
82fcde |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
82fcde |
# Lesser General Public License for more details.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
# License along with the GNU C Library; if not, see
|
|
Packit Service |
82fcde |
# <http://www.gnu.org/licenses/>.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# Generate the list of strings for errno codes from the section of the
|
|
Packit Service |
82fcde |
# manual which documents the codes.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
$(..)sysdeps/gnu/errlist.c: $(..)sysdeps/gnu/errlist.awk \
|
|
Packit Service |
82fcde |
$(..)manual/errno.texi
|
|
Packit Service |
82fcde |
$(AWK) -f $^ > $@-tmp
|
|
Packit Service |
82fcde |
# Make it unwritable so noone will edit it by mistake.
|
|
Packit Service |
82fcde |
-chmod a-w $@-tmp
|
|
Packit Service |
82fcde |
mv -f $@-tmp $@
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ifeq ($(subdir),stdio-common)
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
errlist-c = $(firstword $(wildcard $(addsuffix /errlist.c,$(sysdirs) .)))
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
libof-errlist-compat = extramodules
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ifeq ($(build-shared),yes)
|
|
Packit Service |
82fcde |
$(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
|
|
Packit Service |
82fcde |
$(common-objpfx)Versions.v.i $(before-compile)
|
|
Packit Service |
82fcde |
else
|
|
Packit Service |
82fcde |
$(objpfx)errlist-compat.c: $(errlist-c) $(..)sysdeps/gnu/errlist-compat.awk \
|
|
Packit Service |
82fcde |
$(before-compile)
|
|
Packit Service |
82fcde |
endif
|
|
Packit Service |
82fcde |
$(make-target-directory)
|
|
Packit Service |
82fcde |
$(AWK) -v maxerr=`\
|
|
Packit Service |
82fcde |
$(CC) -S $(CPPFLAGS) $(CFLAGS) -DEMIT_ERR_MAX $< -o - \
|
|
Packit Service |
82fcde |
| sed -n 's/^.*@@@[^0-9]*\([0-9]*\)[^0-9]*@@@.*$$/\1/p'` \
|
|
Packit Service |
82fcde |
-f $(..)sysdeps/gnu/errlist-compat.awk \
|
|
Packit Service |
82fcde |
$(wildcard $(sysdirs:=/Versions)) > $@T
|
|
Packit Service |
82fcde |
# Make it unwritable so noone will edit it by mistake.
|
|
Packit Service |
82fcde |
-chmod a-w $@T
|
|
Packit Service |
82fcde |
mv -f $@T $@
|
|
Packit Service |
82fcde |
$(objpfx)errlist-compat.h: $(objpfx)errlist-compat.c
|
|
Packit Service |
82fcde |
sed -n '1p;/ERR_MAX/p' $< > $@T
|
|
Packit Service |
82fcde |
-chmod a-w $@T
|
|
Packit Service |
82fcde |
mv -f $@T $@
|
|
Packit Service |
82fcde |
generated += errlist-compat.c errlist-compat.h
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
# This will force the generation above to happy if need be.
|
|
Packit Service |
82fcde |
$(foreach o,$(object-suffixes) $(object-suffixes:=.d),\
|
|
Packit Service |
82fcde |
$(objpfx)errlist$o): $(objpfx)errlist-compat.h
|
|
Packit Service |
82fcde |
endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ifeq ($(subdir),login)
|
|
Packit Service |
82fcde |
sysdep_routines += setutxent getutxent endutxent getutxid getutxline \
|
|
Packit Service |
82fcde |
pututxline utmpxname updwtmpx getutmpx getutmp
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
sysdep_headers += utmpx.h bits/utmpx.h
|
|
Packit Service |
82fcde |
endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ifeq ($(subdir),inet)
|
|
Packit Service |
82fcde |
sysdep_headers += netinet/udp.h netinet/ip_icmp.h
|
|
Packit Service |
82fcde |
endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ifeq ($(subdir),misc)
|
|
Packit Service |
82fcde |
sysdep_headers += sys/mtio.h
|
|
Packit Service |
82fcde |
endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ifeq ($(subdir),csu)
|
|
Packit Service |
82fcde |
routines += unwind-resume
|
|
Packit Service |
82fcde |
shared-only-routines += unwind-resume
|
|
Packit Service |
82fcde |
CFLAGS-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit Service |
82fcde |
endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ifeq ($(subdir),rt)
|
|
Packit Service |
82fcde |
librt-sysdep_routines += rt-unwind-resume
|
|
Packit Service |
82fcde |
librt-shared-only-routines += rt-unwind-resume
|
|
Packit Service |
82fcde |
CFLAGS-rt-unwind-resume.c += -fexceptions -fasynchronous-unwind-tables
|
|
Packit Service |
82fcde |
endif
|