mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-18 02:50:09 +00:00
da2d1bc5ad
1998-02-10 23:57 Ulrich Drepper <drepper@happy.cygnus.com> * misc/tst-efgcvt.c: Add more tests. * misc/efgcvt_r.c: Correct result for above new tests. 1998-02-06 17:22 H.J. Lu <hjl@gnu.org> * misc/efgcvt_r.c (fcvt_r, ecvt_r): Correctly handle NDIGIT <= 0. 1998-02-10 16:48 Philip Blundell <pb@nexus.co.uk> * Makerules (install-no-libc.a-nosubdir): Don't install-bin (etc) if the programs weren't built. 1998-02-09 10:12 Philip Blundell <pb@nexus.co.uk> * sysdeps/libm-ieee754/s_exp2.c (__ieee754_exp2): If we don't have FE_TONEAREST, soldier on regardless and do the best we can. * sysdeps/libm-ieee754/s_exp2f.c (__ieee754_exp2f): likewise. 1998-02-5 17:20 Philip Blundell <pb@nexus.co.uk> * sysdeps/standalone/filedesc.h: Define __need_FOPEN_MAX, not _STDIO_H, before including <bits/stdio_lim.h>. * sysdeps/standalone/arm/bits/errno.h (EOVERFLOW): Added. * io/fts.c (fts_build): Don't try to use d_type if it doesn't exist. * sysdeps/arm/sys/ucontext.h: New file. 1998-02-04 10:11 Philip Blundell <pb@nexus.co.uk> * manual/stdio.texi (Formatted Output Functions): Explicitly say that the return value from snprintf() does not count the terminating NUL as a character. 1998-02-10 16:57 Ulrich Drepper <drepper@happy.cygnus.com> * manual/users.texi: Rewrite to describe correct POSIX behaviour, add description for sete[ug]id and general cleanup. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>. 1998-01-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile (parent-clean): Don't remove makefile fragments here. (postclean): New variable. (clean): Remove makefile fragments here. (realclean distclean): Likewise. Pass sysdep-subdirs to sub-make. (generated): Add isomac and isomanc.out. * Makeconfig ($(common-objpfx)soversions.mk): Don't generate if avoid-generated is set. (postclean-generated): Add soversion.mk. ($(common-objpfx)version.mk): Don't include if avoid-generated is set. * Makerules: Still need to include $(+sysdir_pfx)sysd-Makefile if avoid-generated is set. (common-generated): Add libc.so and libc.so$(libc.so-version). (generated): Add versioned libraries. (common-mostlyclean): Also remove %.so and %_pic.a. * csu/Makefile (generated): Add abi-tag.h. * db2/Makefile (extra-objs): Add getlong.o. * elf/Makefile (generated): Add ld.so, ldd and $(rtld-installed-name). (others): Add ldconfig here instead of ldconfig.o to extra-objs. * malloc/Makefile (generated): Add mtrace. * po/Makefile: Don't include version.mk, not needed any more. * sunrpc/Makefile (generated): Add rpc-proto.d and rpcgen. * sysdeps/unix/Makefile: Fix local_lim.h -> bits/local_lim.h, syscall.h -> sys/syscall.h. (common-generated): Add s-proto.d. (postclean-generated): Add sysd-syscalls. * localedata/Makefile (test-output): Add all output files. (generated): Add test-input and test-output. (generated-dirs): Add all the dirs. 1998-01-04 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile (test-output, generated, generated-dirs): New variables. 1998-02-10 16:57 Ulrich Drepper <drepper@happy.cygnus.com> * resolv/nss_dns/dns-host.c: Various code cleanups. 1998-02-09 08:10 H.J. Lu <hjl@gnu.org> * resolv/gethnamaddr.c (getanswer): Fix the PTR/CNAME bug. From Philip Blundell <pb@nexus.co.uk>. * resolv/nss_dns/dns-host.c (getanswer_r): Ditto. 1998-02-08 Andreas Jaeger <aj@arthur.rhein-neckar.de> * libc.map: Add .rem, .div, .mul, .udiv, .umul, .urem for Sparc. Suggested by debian/sparc porters. 1998-02-07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * misc/tst-efgcvt.c: Totally rewritten, added a lot of new tests for ecvt and fcvt. 1998-02-10 16:32 Ulrich Drepper <drepper@happy.cygnus.com> * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Use __xstat and __fxstat instead of stat and fstat. Use namespace clean __stpcpy. * signal/signal.h: Always define sigset_t if __need_sigset_t is defined even if __USE_POSIX is not defined. 1998-02-02 20:51 Zack Weinberg <zack@rabi.phys.columbia.edu> * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Correct last patch to support obsolete tty major numbers correctly. 1998-02-02 08:47 H.J. Lu <hjl@gnu.org> * login/Makefile ($(inst_libexecdir)/pt_chown): Make the target directory first and ignore install error. * sysdeps/unix/sysv/linux/ptsname.c (__ptsname_r): Substract 128 from ptyno and fix a typo for the BSD style pty. 1998-02-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/Makefile ($(common-objpfx)s-proto.d): Depend on all syscalls.list's. 1998-02-01 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/Makefile (sysdep_routines): Add getresuid and getresgid. * sysdeps/unix/sysv/linux/getresuid.c: New file. * sysdeps/unix/sysv/linux/getresgid.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Remove getres[ug]id, add s_getres[ug]id. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add getres[ug]id. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/syscalls.list: Likewise. 1998-02-02 08:11 H.J. Lu <hjl@gnu.org> * nscd/grpcache.c: Include <stdlib.h>. 1998-02-01 16:01 H.J. Lu <hjl@gnu.org> * stdlib/atoll.c: Fix comments. * sysdeps/posix/ttyname.c: Ignore stdin/stdout/stderr. * sysdeps/posix/ttyname_r.c: Ditto. 1998-02-03 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * io/sys/stat.h: Define S_IFLNK and S_IFSOCK if __USE_BSD or __USE_MISC, independent of __USE_UNIX98. 1998-02-10 19:18 Ulrich Drepper <drepper@happy.cygnus.com> * sysdeps/unix/sysv/linux/i386/sigaction.c (__libc_missing_rt_sigs): Rename from __libc_have_rt_sigs and leave as COMMON data. 1998-02-04 11:58 Richard Henderson <rth@twiddle.rth.home> * Makeconfig (CFLAGS-.os): Kill -fno-common. * Makerules (libc.so): Prelink libc_pic.a, allocating commons. * libc.map (GLIBC_2.1): Add Linux/Alpha tv64 symbols. * elf/rtld.map: New file. Needed to define the GLIBC_2.* version symbols. * include/libc-symbols.h (symbol_version, default_symbol_version): Provide asm versions and correct !DO_VERSIONING versions. * sysdeps/unix/make-syscalls.sh: Recognize version symbols in the weak symbol list. * sysdeps/unix/sysv/linux/sigaction.c (__libc_missing_rt_sigs): Rename from __libc_have_rt_sigs and leave as COMMON data. * sysdeps/unix/sysv/linux/sigpending.c: Likewise. * sysdeps/unix/sysv/linux/sigprocmask.c: Likewise. * sysdeps/unix/sysv/linux/sigsuspend.c: Likewise. 1998-02-04 16:41 Zack Weinberg <zack@rabi.phys.columbia.edu> * sunrpc/Makefile: Correct dependencies of rpcgen. 1998-02-10 03:00 Ulrich Drepper <drepper@happy.cygnus.com> * nscd/Makefile: Fix test for available linuxthreads add-on. Patch by Zack Weinberg <zack@rabi.phys.columbia.edu>. 1998-02-05 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/unix/sysv/linux/syscalls.list: Fix typo in lchown. 1998-02-03 Andreas Jaeger <aj@arthur.rhein-neckar.de> * sysdeps/gnu/Makefile: Respect with-cvs variable. * manual/errno.texi (Error Messages): Correct description of strerror_r. Pointed out by jonas@bagge.se. 1998-01-29 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/socket.texi (Host Address Functions): Clarify description of inet_network. 1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/grantpt.c (argv): Move const to toplevel. (grantpt): Delete superfluous cast. 1998-02-06 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile ($(inst_slibdir)/libc-$(version).so): Depend on elf/ldso_install instead of elf/subdir_install. (elf/ldso_install): New target. * elf/Makefile (ldso_install): New target. 1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/powerpc/socket.S: Really do the change of 1998-01-06. 1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * string/bits/string2.h (strcmp): Use __string2_1bptr_p only for constant expressions. 1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * nss/test-netdb.c: Include <unistd.h> for gethostname and "nss.h" for __nss_configure_lookup. (output_hostent): Remove unused variable. 1998-02-07 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * string/tst-inlcall.c: Fix format string. 1998-02-09 Andreas Jaeger <aj@arthur.rhein-neckar.de> * inet/netinet/in.h: Rename second parameter of bindresvport to avoid buggy gcc warning. [PR libc/412]
315 lines
10 KiB
Makefile
315 lines
10 KiB
Makefile
# Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
|
||
# This file is part of the GNU C Library.
|
||
|
||
# The GNU C Library is free software; you can redistribute it and/or
|
||
# modify it under the terms of the GNU Library General Public License as
|
||
# published by the Free Software Foundation; either version 2 of the
|
||
# License, or (at your option) any later version.
|
||
|
||
# The GNU C Library is distributed in the hope that it will be useful,
|
||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
# Library General Public License for more details.
|
||
|
||
# You should have received a copy of the GNU Library General Public
|
||
# License along with the GNU C Library; see the file COPYING.LIB. If not,
|
||
# write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||
# Boston, MA 02111-1307, USA.
|
||
|
||
# The unix-specific configure fragment writes `unix-generated' in config.make.
|
||
config-generated := $(config-generated) $(unix-generated)
|
||
|
||
ifeq (,$(filter-out $(sysdep_dir)/generic/ $(common-objpfx),\
|
||
$(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/bits/local_lim.h))))))
|
||
|
||
ifneq (,$(wildcard $(sysincludedir)/sys/param.h))
|
||
mk-local_lim-CFLAGS += -DHAVE_SYS_PARAM_H
|
||
endif
|
||
ifneq (,$(wildcard $(sysincludedir)/sys/limits.h))
|
||
mk-local_lim-CFLAGS += -DHAVE_SYS_LIMITS_H
|
||
endif
|
||
ifneq (,$(wildcard $(sysincludedir)/limits.h))
|
||
mk-local_lim-CFLAGS += -DHAVE_LIMITS_H
|
||
endif
|
||
|
||
$(common-objpfx)bits/local_lim.h: $(common-objpfx)mk-local_lim
|
||
$(dir $<)$(notdir $<) > $@-t
|
||
mv -f $@-t $@
|
||
$(common-objpfx)mk-local_lim: $(sysdep_dir)/unix/mk-local_lim.c
|
||
$(common-objdir-compile)
|
||
|
||
before-compile += $(common-objpfx)bits/local_lim.h
|
||
common-generated += bits/local_lim.h mk-local_lim
|
||
|
||
endif
|
||
|
||
ifeq (,$(filter-out $(sysdep_dir)/generic/ $(common-objpfx),\
|
||
$(patsubst %/sys/param.h,%/,\
|
||
$(firstword $(wildcard $(+sysdep_dirs:%=%/sys/param.h))))))
|
||
|
||
before-compile := $(before-compile) $(common-objpfx)sys/param.h
|
||
|
||
$(common-objpfx)sys/param.h: $(sysincludedir)/sys/param.h
|
||
$(make-target-directory)
|
||
(echo '#ifndef _SYS_PARAM_H'; \
|
||
echo '#define _SYS_PARAM_H 1'; \
|
||
echo '#include <endian.h>'; \
|
||
awk < $< \
|
||
'/^#define[ ]*NULL/ { print "#ifndef NULL"; \
|
||
print $$0; \
|
||
print "#endif"; \
|
||
was_null = 1 } \
|
||
{ if (!was_null) print $$0; \
|
||
was_null = 0 }'; \
|
||
echo '#ifndef MAXHOSTNAMELEN'; \
|
||
echo '#define MAXHOSTNAMELEN 64 /* XXX */'; \
|
||
echo '#endif /* No MAXHOSTNAMELEN. */'; \
|
||
echo '#endif /* sys/param.h */') > $@-tmp
|
||
mv $@-tmp $@
|
||
|
||
$(common-objpfx)param.h.c: $(sysincludedir)/sys/param.h
|
||
rm -f $@
|
||
cp $< $@
|
||
$(common-objpfx)param.h.dep: $(common-objpfx)param.h.c \
|
||
$(sysdep_dir)/unix/Makefile
|
||
$(+mkdep) -I$(sysincludedir) $< \
|
||
| sed > $@-t \
|
||
-e 's@^.*:@@' \
|
||
-e 's@$<@@g' \
|
||
-e 's@$(sysincludedir)/*@@g' \
|
||
-e 's@\\$$@@' \
|
||
-e 's@^@sys/param.h-includes := $$(sys/param.h-includes) @'
|
||
mv $@-t $@
|
||
|
||
# Get the generated definition of sys/param.h-includes.
|
||
ifndef no_deps
|
||
-include $(common-objpfx)param.h.dep
|
||
endif
|
||
|
||
# Don't preempt our own headers.
|
||
sys/param.h-includes := \
|
||
$(filter-out $(patsubst $(..)%,%,\
|
||
$(wildcard $(addprefix $(..),\
|
||
$(sys/param.h-includes)))),\
|
||
$(sys/param.h-includes))
|
||
|
||
|
||
.PHONY: sys/param.h-includes
|
||
sys/param.h-includes: $(addprefix $(common-objpfx),$(sys/param.h-includes))
|
||
|
||
ifdef sys/param.h-includes
|
||
# Copy the system files to $(common-objdir).
|
||
$(addprefix $(common-objpfx),$(sys/param.h-includes)): $(common-objpfx)%: \
|
||
$(sysincludedir)/%
|
||
$(make-target-directory)
|
||
# Some of these files sometimes contain conflicting declarations for htons,
|
||
# ntohs, etc. They also often contain definitions of *_ENDIAN and
|
||
# BYTE_ORDER, which we define ourselves in <endian.h>.
|
||
sed -e '/[ ]*[hn]to[nh][sl][ (]*/d' \
|
||
-e '/^#define[ ]*[A-Z]*_ENDIAN/d' \
|
||
-e '/^#define[ ]*BYTE_ORDER/d' \
|
||
$< > $@-t
|
||
mv $@-t $@
|
||
endif
|
||
|
||
common-generated := $(common-generated) \
|
||
sys/param.h $(sys/param.h-includes) param.h.c param.h.dep
|
||
|
||
|
||
ifeq ($(subdir),misc)
|
||
|
||
# Install system headers the system sys/param.h uses.
|
||
|
||
sysdep_headers := $(sysdep_headers) $(sys/param.h-includes)
|
||
|
||
endif # misc
|
||
|
||
endif # No sysdep sys/param.h.
|
||
|
||
ifeq (,$(filter-out $(sysdep_dir)/generic/ $(common-objpfx),\
|
||
$(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/bits/errno.h))))))
|
||
|
||
# These need to exist before any compiling is done,
|
||
# so cpp doesn't instead find the generic versions.
|
||
before-compile := $(before-compile) $(common-objpfx)bits/errno.h
|
||
|
||
$(common-objpfx)bits/errno.h: $(common-objpfx)make-errnos
|
||
$(dir $<)$(notdir $<) > $@-tmp
|
||
mv $@-tmp $@
|
||
|
||
$(common-objpfx)make-errnos: $(common-objpfx)make-errnos.c
|
||
$(common-objdir-compile)
|
||
|
||
$(common-objpfx)make-errnos.c: $(sysdep_dir)/unix/errnos-tmpl.c \
|
||
$(sysdep_dir)/unix/errnos.awk $(common-objpfx)errnos
|
||
awk -f $(word 2,$^) errnos="`tr '\012' ' ' < $(word 3,$^)`" $< > $@T
|
||
mv $@T $@
|
||
|
||
$(common-objpfx)errnos: $(wildcard $(sysincludedir)/errno.h \
|
||
$(sysincludedir)/sys/errno.h)
|
||
sed -n 's/^#define[ ]*\(E[A-Z0-9][A-Z0-9]*\)[ ].*$$/\1/p' \
|
||
$^ > $@-tmp
|
||
mv $@-tmp $@
|
||
|
||
common-generated := $(common-generated) \
|
||
errnos.h errnos make-errnos make-errnos.c
|
||
endif
|
||
|
||
ifeq (,$(filter-out $(sysdep_dir)/generic/ $(common-objpfx),\
|
||
$(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/bits/ioctls.h))))))
|
||
|
||
before-compile := $(before-compile) $(common-objpfx)bits/ioctls.h
|
||
|
||
$(common-objpfx)bits/ioctls.h: $(common-objpfx)make-ioctls
|
||
$(dir $<)$(notdir $<) > $@-tmp
|
||
mv $@-tmp $@
|
||
|
||
ioctl-includes := sys/termios.h net/nit.h
|
||
ioctl-includes := $(wildcard $(addprefix $(sysincludedir)/,$(ioctl-includes)))
|
||
make-ioctls-CFLAGS := $(subst /,_,$(subst .,_,\
|
||
$(patsubst $(sysincludedir)/%,-DHAVE_%,\
|
||
$(ioctl-includes))))
|
||
|
||
$(common-objpfx)make-ioctls: $(common-objpfx)make-ioctls.c
|
||
$(common-objdir-compile)
|
||
|
||
$(common-objpfx)make-ioctls.c: $(sysdep_dir)/unix/ioctls-tmpl.c \
|
||
$(sysdep_dir)/unix/ioctls.awk \
|
||
$(common-objpfx)ioctls
|
||
awk -f $(word 2,$^) requests="`cat $(word 3,$^)`" $< > $@T
|
||
mv $@T $@
|
||
|
||
|
||
bits_termios.h := $(firstword $(wildcard $(+sysdep_dirs:%=%/bits/termios.h)))
|
||
ifeq ($(bits_termios.h),$(sysdep_dir)/generic/bits/termios.h)
|
||
bits_termios.h := # Ignore the generic version.
|
||
endif
|
||
|
||
# If there is a system-specific <bits/termios.h> file, we want to omit
|
||
# all the symbols it defines from ioctls. Otherwise, both
|
||
# <bits/ioctls.h> and <bits/termios.h> would define them. The
|
||
# system-specific <bits/termios.h> file presumably defines them with
|
||
# the same values as we find from the system's headers. We also want
|
||
# to omit from ioctls the symbols defined in our own
|
||
# <sys/ttydefaults.h>, to avoid multiple definition conflicts. We use
|
||
# snarf-ioctls on these files to find what symbols we want to omit.
|
||
# fgrep -xv gives all lines which do not match in their entirety;
|
||
# without -x, CSTOP's presence elided TIOCSTOP.
|
||
|
||
$(common-objpfx)ioctls: $(sysdep_dir)/unix/snarf-ioctls \
|
||
$(sysincludedir)/sys/ioctl.h $(ioctl-includes)
|
||
$(dir $<)$(notdir $<) $(filter-out $<,$^) \
|
||
| fgrep -xv "`($(dir $<)$(notdir $<) $(bits_termios.h) \
|
||
$(..)sysdeps/generic/sys/ttydefaults.h; \
|
||
echo NULL) \
|
||
| sort | uniq`" \
|
||
| sort | uniq | tr '\012' ' ' > $@-tmp
|
||
mv $@-tmp $@
|
||
|
||
common-generated := $(common-generated) \
|
||
bits/ioctls.h ioctls make-ioctls make-ioctls.c
|
||
endif
|
||
|
||
ifeq ($(subdir),stdio-common)
|
||
ifeq (,$(filter-out $(sysdep_dir)/generic/ $(objpfx),\
|
||
$(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/errlist.c))))))
|
||
|
||
before-compile: $(objpfx)errlist.c
|
||
$(objpfx)errlist.c: $(objpfx)make_errlist
|
||
@rm -f $@
|
||
$(dir $<)$(notdir $<) > $@-tmp
|
||
mv $@-tmp $@
|
||
|
||
$(objpfx)make_errlist: $(sysdep_dir)/unix/make_errlist.c
|
||
$(native-compile)
|
||
|
||
generated := $(generated) make_errlist errlist.c
|
||
|
||
endif
|
||
endif # stdio-common
|
||
|
||
ifeq (,$(filter-out $(sysdep_dir)/generic/ $(common-objpfx),\
|
||
$(dir $(firstword $(wildcard $(+sysdep_dirs:%=%/sys/syscall.h))))))
|
||
|
||
# The syscall code assumes a file <sys/syscall.h> that defines macros
|
||
# `SYS_call' for syscall `call'. Variations on this I have seen include:
|
||
# it's in <sys/syscall.h>;
|
||
# it's in <sys.s>;
|
||
# it defines `CALL' instead of `SYS_call'.
|
||
# Irix has a <syscall.h> which is not what we want, so check for <sys.s> first.
|
||
|
||
# Find a file that might have these. NOTE: This list of possibilities is
|
||
# repeated in sysdeps/unix/configure and the two should be kept in sync.
|
||
syscall.h := $(firstword $(wildcard $(addprefix $(sysincludedir)/, \
|
||
sys.s sys/sys.s \
|
||
sys.S sys/sys.S \
|
||
syscall.h sys/syscall.h \
|
||
)))
|
||
ifdef syscall.h
|
||
|
||
# Transmogrify any of several formats of the file into the one we want.
|
||
$(common-objpfx)sys/syscall.h: $(syscall.h)
|
||
$(make-target-directory)
|
||
tr '[A-Z]' '[a-z]' < $< | \
|
||
sed -e 's/[ ]sys_/ /' \
|
||
-e 's/^#define[ ]*\([a-z0-9_]*\)[ ]*/#define SYS_\1 /' \
|
||
-e 's/[ ]sys_/ SYS_/' \
|
||
-e 's/SYS_syscall_basenum/syscall_basenum/g' \
|
||
-e 's/SYS_kerncall_basenum/kerncall_basenum/g' \
|
||
-e 's/SYS_sysvoffset/sysvoffset/g' \
|
||
-e '/^#/!d' \
|
||
-e '/^#ident/d' \
|
||
-e 's-\(/\*[^*]*\)$$-\1\*/-' \
|
||
> $@-tmp
|
||
mv $@-tmp $@
|
||
|
||
before-compile += $(common-objpfx)sys/syscall.h
|
||
common-generated += sys/syscall.h
|
||
|
||
endif
|
||
|
||
endif
|
||
|
||
ifndef inhibit-unix-syscalls
|
||
|
||
# Sysdep dirs unix/... can contain a file syscalls.list,
|
||
# which specifies objects to be compiled as simple Unix system calls.
|
||
|
||
-include $(common-objpfx)sysd-syscalls
|
||
omit-deps += $(unix-syscalls)
|
||
|
||
ifeq (misc,$(subdir))
|
||
sysdep_routines += $(unix-extra-syscalls)
|
||
endif
|
||
|
||
export sysdirs
|
||
export asm_CPP := $(COMPILE.S) -E -x assembler-with-cpp
|
||
|
||
$(common-objpfx)sysd-syscalls: $(..)sysdeps/unix/make-syscalls.sh \
|
||
$(wildcard $(+sysdep_dirs:%=%/syscalls.list))
|
||
for dir in $(+sysdep_dirs); do \
|
||
test -f $$dir/syscalls.list && \
|
||
{ $(SHELL) $(dir $<)$(notdir $<) $$dir || exit 1; }; \
|
||
test $$dir = $(..)sysdeps/unix && break; \
|
||
done > $@T
|
||
mv -f $@T $@
|
||
|
||
# This syscall objects depend on s-proto.d, which is generated to
|
||
# specify dependencies generated syscalls with have on headers.
|
||
ifdef subdir
|
||
ifndef no_deps
|
||
# These deps use file names relative to a subdir, so don't
|
||
# include them in the parent directory.
|
||
-include $(common-objpfx)s-proto.d
|
||
endif
|
||
endif
|
||
|
||
$(common-objpfx)s-proto.d: $(common-objpfx)%.d: $(..)sysdeps/unix/%.S \
|
||
$(wildcard $(+sysdep_dirs:%=%/syscalls.list))
|
||
$(+make-deps)
|
||
|
||
common-generated += s-proto.d
|
||
postclean-generated += sysd-syscalls
|
||
|
||
endif
|