about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/mips
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-05-28 21:05:12 +0000
committerRoland McGrath <roland@gnu.org>2003-05-28 21:05:12 +0000
commit7cd72ad38093e584cb143ac6e4b1453dee5f7ac7 (patch)
treeda182882630e13b7f8c1e9b05fcd3cb1fe68bf48 /sysdeps/unix/sysv/linux/mips
parentd49c05e00f2b50f7a3e81f13803bdb34bd1970f7 (diff)
downloadglibc-7cd72ad38093e584cb143ac6e4b1453dee5f7ac7.tar.gz
glibc-7cd72ad38093e584cb143ac6e4b1453dee5f7ac7.tar.xz
glibc-7cd72ad38093e584cb143ac6e4b1453dee5f7ac7.zip
2003-05-11 Andreas Schwab <schwab@suse.de>
	* Makerules: Always use -MP together with -MD.
	(sed-remove-dotot): Substitute $(..) also at start of line.
	($(stdio_lim:h=st)): Use -MD instead of SUNPRO_DEPENDENCIES.
	Generated defines with a single compiler call.
	Use $(sed-remove-dotdot).
	* mach/Makefile ($(objpfx)mach-syscalls.mk): Use -MD instead
	of DEPENDENCIES_OUTPUT, and use $(sed-remove-objpfx).
	* sysdeps/unix/sysv/linux/Makefile ($(objpfx)syscall-%.h):
	Use -MD instead of SUNPRO_DEPENDENCIES, and use $(sed-remove-objpfx).
	* sysdeps/unix/sysv/linux/mips/Makefile
	($(objpfx)syscall-%.h): Likewise.
Diffstat (limited to 'sysdeps/unix/sysv/linux/mips')
-rw-r--r--sysdeps/unix/sysv/linux/mips/Makefile15
1 files changed, 8 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 799f5ae0d5..424fb5ecd3 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -15,7 +15,6 @@ no_syscall_list_h = 1
 # 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
-	rm -f $(@:.h=.d)-t
 	{ \
 	 echo '/* Generated at libc build time from kernel syscall list.  */';\
 	 echo ''; \
@@ -24,9 +23,10 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s
 	 echo '#endif'; \
 	 echo ''; \
 	 rm -f $(@:.d=.h).newt; \
-	 SUNPRO_DEPENDENCIES='$(@:.h=.d)-t $@' \
-	 $(CC) -E -x c -I $(common-objdir) $(sysincludes) $< -D_LIBC -dM | \
-	 sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' > $(@:.d=.h).newt; \
+	 $(CC) -E -MD -MP -MF $(@:.h=.d)-t -MT '$(@:.d=.h) $(@:.h=.d)' \
+	       -x c -I $(common-objdir) $(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 defined _ABI64 && _MIPS_SIM == _ABI64'; \
 	   sed -n 's/^\(#define SYS_\)N64_/\1/p' < $(@:.d=.h).newt; \
@@ -42,9 +42,10 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/mips/sys/s
 	 rm $(@:.d=.h).newt; \
 	} > $(@:.d=.h).new
 	mv -f $(@:.d=.h).new $(@:.d=.h)
-	sed < $(@:.h=.d)-t > $(@:.h=.d)-t2 \
-	    -e 's,$(subst .,\.,$@),$(patsubst $(objpfx)%,$$(objpfx)%,\
-					      $(@:.d=.h) $(@:.h=.d)),'
+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