about summary refs log tree commit diff
path: root/mach/Machrules
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
committerJakub Jelinek <jakub@redhat.com>2007-07-12 18:26:36 +0000
commit0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (patch)
tree2ea1f8305970753e4a657acb2ccc15ca3eec8e2c /mach/Machrules
parent7d58530341304d403a6626d7f7a1913165fe2f32 (diff)
downloadglibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.gz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.tar.xz
glibc-0ecb606cb6cf65de1d9fc8a919bceb4be476c602.zip
2.5-18.1
Diffstat (limited to 'mach/Machrules')
-rw-r--r--mach/Machrules14
1 files changed, 8 insertions, 6 deletions
diff --git a/mach/Machrules b/mach/Machrules
index 79dec997e9..37693aec43 100644
--- a/mach/Machrules
+++ b/mach/Machrules
@@ -1,5 +1,5 @@
 # Rules for MiG interfaces that want to go into the C library.
-# Copyright (C) 1991,92,93,94,95,96,98,99,2001,02
+# Copyright (C) 1991,1992,1993,1994,1995,1996,1998,1999,2001,2002,2006
 #	Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
@@ -138,10 +138,11 @@ $(patsubst %,$(objpfx)%.udeps,$(user-interfaces)):
 # We must use $(CFLAGS) to get -O flags that affect #if's in header files.
 	$(include-%.defs) | \
 	$(CC) $(CFLAGS) $(CPPFLAGS) -M -x c - | \
-	sed -e 's,- *:,$@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h)\
-			  $(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \
+	sed -e 's,- *:,$(.udeps-targets):,' \
 	    $(sed-remove-objpfx) > $@.new
 	mv -f $@.new $@
+.udeps-targets = $@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h) \
+		 $(@:.udeps=_server.c) $(@:.udeps=_server.h)
 endif
 
 # Look for the server stub files where they will be written.
@@ -158,14 +159,14 @@ $(objpfx)%_server.c $(objpfx)%_server.h:
 
 # To get header files that declare both the straight and __ functions,
 # we generate two files and paste them together.
-$(objpfx)%.uh:; $(mig.uh)
+$(patsubst %,$(objpfx)%.uh,$(user-interfaces)): $(objpfx)%.uh:; $(mig.uh)
 define mig.uh
 $(make-target-directory)
 $(include-%.defs) | \
 $(MIG) - /dev/null $(MIGFLAGS) $(MIGFLAGS-$*) \
        -header $@ -server /dev/null -user /dev/null
 endef
-$(objpfx)%.__h:; $(mig.__h)
+$(patsubst %,$(objpfx)%.__h,$(user-interfaces)): $(objpfx)%.__h:; $(mig.__h)
 define mig.__h
 $(make-target-directory)
 $(include-%.defs) | \
@@ -173,7 +174,8 @@ $(MIG) - /dev/null $(MIGFLAGS) $(MIGFLAGS-$*) -prefix __ \
        -header $@ -server /dev/null -user /dev/null
 endef
 
-$(objpfx)%.h: $(objpfx)%.__h $(objpfx)%.uh
+$(patsubst %,$(objpfx)%.h,$(user-interfaces)): $(objpfx)%.h: $(objpfx)%.__h \
+							     $(objpfx)%.uh
 # The last line of foo.__h is "#endif _foo_user_".
 # The first two lines of foo.uh are "#ifndef _foo_user_"/"#define _foo_user_".
 	(sed -e '$$d' $<; sed -e '1,2d' $(word 2,$^)) > $@-new