glibc/sysdeps/unix/sysv/linux/mips/Makefile
Andreas Jaeger 918f187fcf UPdate.
* sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h):
	Sort by syscalls.  Make sure we get headers such as sgidefs.h from
	the build tree before just-installed ones.

	* sysdeps/mips/atomicity.h, sysdeps/mips/dl-machine.h,
	sysdeps/mips/machine-gmon.h, sysdeps/mips/bits/setjmp.h,
	sysdeps/mips/fpu/bits/mathdef.h,
	sysdeps/mips/mips64/__longjmp.c,
	sysdeps/mips/mips64/setjmp_aux.c,
	sysdeps/unix/sysv/linux/mips/kernel_stat.h,
	sysdeps/unix/sysv/linux/mips/pread.c,
	sysdeps/unix/sysv/linux/mips/pread64.c,
	sysdeps/unix/sysv/linux/mips/ptrace.c,
	sysdeps/unix/sysv/linux/mips/pwrite.c,
	sysdeps/unix/sysv/linux/mips/pwrite64.c,
	sysdeps/unix/sysv/linux/mips/sigaction.c,
	sysdeps/unix/sysv/linux/mips/sigcontextinfo.h,
	sysdeps/unix/sysv/linux/mips/bits/fcntl.h,
	sysdeps/unix/sysv/linux/mips/bits/sigcontext.h,
	sysdeps/unix/sysv/linux/mips/bits/stat.h,
	sysdeps/unix/sysv/linux/mips/sys/procfs.h,
	sysdeps/unix/sysv/linux/mips/sys/ptrace.h,
	sysdeps/unix/sysv/linux/mips/sys/tas.h,
	sysdeps/unix/sysv/linux/mips/sys/ucontext.h,
	sysdeps/unix/sysv/linux/mips/sys/user.h: Use standard names
	for ABI macros, include sgidefs.h where appropriate.
	sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h):
	Likewise.
	sysdeps/unix/sysv/linux/mips/configure.in (asm-unistd.h):
	Likewise.
	sysdeps/unix/sysv/linux/mips/configure: Rebuilt.
2004-07-20 16:39:51 +00:00

57 lines
1.9 KiB
Makefile

ifeq ($(subdir),signal)
#sysdep_routines += sigsuspend
endif
ifeq ($(subdir),misc)
sysdep_routines += cachectl cacheflush sysmips _test_and_set
sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
no_syscall_list_h = 1
# Generate the list of SYS_* macros for the system calls (__NR_* macros).
# We generate not only SYS_<syscall>, pointing at SYS_<abi>_<syscall> if
# it exists, but also define SYS_<abi>_<syscall> for all ABIs.
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/syscall.h
$(make-target-directory)
{ \
echo '/* Generated at libc build time from kernel syscall list. */';\
echo ''; \
echo '#ifndef _SYSCALL_H'; \
echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
echo '#endif'; \
echo ''; \
echo '#include <sgidefs.h>'; \
rm -f $(@:.d=.h).newt; \
$(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
-x c $(+includes) $(sysincludes) $< -D_LIBC -dM | \
sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' \
> $(@:.d=.h).newt; \
if grep SYS_O32_ $(@:.d=.h).newt > /dev/null; then \
echo '#if _MIPS_SIM == _MIPS_SIM_NABI32'; \
sed -n 's/^\(#define SYS_\)N32_/\1/p' < $(@:.d=.h).newt | \
LC_ALL=C sort; \
echo '#elif _MIPS_SIM == _MIPS_SIM_ABI64'; \
sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt | \
LC_ALL=C sort; \
echo '#else'; \
sed -n 's/^\(#define SYS_\)O32_/\1/p' < $(@:.d=.h).newt | \
LC_ALL=C sort; \
echo '#endif'; \
sed -n '/^#define SYS_\([ON]32\|N64\)_/p' < $(@:.d=.h).newt | \
LC_ALL=C sort +1.8; \
else \
cat $(@:.d=.h).newt; \
fi; \
rm $(@:.d=.h).newt; \
} > $(@:.d=.h).new
mv -f $(@:.d=.h).new $(@:.d=.h)
ifneq (,$(objpfx))
sed $(sed-remove-objpfx) $(@:.h=.d)-t > $(@:.h=.d)-t2
rm -f $(@:.h=.d)-t
mv -f $(@:.h=.d)-t2 $(@:.h=.d)
else
mv -f $(@:.h=.d)-t $(@:.h=.d)
endif
endif