about summary refs log tree commit diff
path: root/mach/Makefile
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 /mach/Makefile
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 'mach/Makefile')
-rw-r--r--mach/Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/mach/Makefile b/mach/Makefile
index 563c792078..314f2efcd9 100644
--- a/mach/Makefile
+++ b/mach/Makefile
@@ -79,12 +79,17 @@ $(objpfx)mach-syscalls.mk: syscalls.awk Makefile
 	$(make-target-directory)
 # We must use $(CFLAGS) to get -O flags that affect #if's in header files.
 	echo '#include <mach/syscall_sw.h>' | \
-	DEPENDENCIES_OUTPUT='$@-dep $@' \
-	$(CC) $(CFLAGS) $(CPPFLAGS) -E -x c-header - \
+	$(CC) $(CFLAGS) $(CPPFLAGS) -E -MD -MP -MF $@-dep -MT $@ \
+	      -x c-header - \
 	      -D_MACH_`echo $(mach-machine) | tr a-z A-Z`_SYSCALL_SW_H_=1 | \
 	sed -n -e 's/^kernel_trap(\(.*\),\([-0-9]*\),\([0-9]*\))$$/\1 \2 \3/p'\
 	| $(AWK) -f $< > $@-new
-	cat $@-dep >> $@-new; rm -f $@-dep
+ifneq (,$(objpfx))
+	sed $(sed-remove-objpfx) $@-dep >> $@-new
+else
+	cat $@-dep >> $@-new
+endif
+	rm -f $@-dep
 	mv -f $@-new $@
 generated += mach-syscalls.mk