aboutsummaryrefslogtreecommitdiff
path: root/mach/Machrules
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-06-05 19:07:37 +0000
committerRoland McGrath <roland@gnu.org>1996-06-05 19:07:37 +0000
commitaa592a63f9c6541bc4661eed409b89248a58f311 (patch)
treed61f7dfaf21beb67509cb5a4fbd3300b2f7708a5 /mach/Machrules
parent198046e105783f200a3512c2fcb986570f81b0a0 (diff)
downloadglibc-aa592a63f9c6541bc4661eed409b89248a58f311.zip
glibc-aa592a63f9c6541bc4661eed409b89248a58f311.tar.gz
glibc-aa592a63f9c6541bc4661eed409b89248a58f311.tar.bz2
* Makerules (distinfo-vars): Add sysdep_routines.
* mach/Machrules (include-%.defs): New canned sequence. Change all uses of `#include <$*.defs>' in cmds to use it. * mach/Makefile (mach_interface.defs): New variable, set to mach.defs. * sysdeps/i386/dl-machine.h (elf_machine_rel): Handle RESOLVE being null in all cases but R_386_COPY. (elf_machine_rel): * sysdeps/unix/bsd/ultrix4/mips/Dist: Updated. * sysdeps/unix/bsd/ultrix4/Dist: Removed. * sysdeps/unix/sysv/sysv4/Dist: Updated. * sysdeps/unix/sysv/sco3.2.4/Dist: Removed. * sysdeps/unix/sysv/irix4/Dist: Updated. * sysdeps/unix/sysv/linux/i386/Dist: Removed. * sysdeps/unix/sysv/Dist: Updated. * sysdeps/unix/bsd/sun/sunos4/Dist: Removed. * sysdeps/unix/bsd/sony/newsos4/Dist: Removed. * sysdeps/gnu/Dist: New file. * sysdeps/alpha/Dist: Updated. * sysdeps/mach/hurd/Dist: Updated. * Make-dist [subdir-dirs]: Set a vpath for %.c. * Make-dist (README): Fix typo in cvs cmd.
Diffstat (limited to 'mach/Machrules')
-rw-r--r--mach/Machrules17
1 files changed, 12 insertions, 5 deletions
diff --git a/mach/Machrules b/mach/Machrules
index bc0ee37..cd2545b 100644
--- a/mach/Machrules
+++ b/mach/Machrules
@@ -100,10 +100,17 @@ echo "weak_alias (__$$call, $$call)" >> $(objpfx)tmp_$${call}.c;
endef
endif
+
+# Generate `#include <NAME.defs>', taking $* for NAME.
+# If $(NAME.defs) is defined use its value in place of `NAME.defs'.
+define include-%.defs
+echo '#include <$(firstword $($*.defs) $*.defs)>'
+endef
+
# Not an implicit rule so the stamps are never removed as intermediates!
$(patsubst %,$(objpfx)%.ustamp,$(user-interfaces)): $(objpfx)%.ustamp:
rm -f $@
- echo '#include <$*.defs>' | \
+ $(include-%.defs) | \
$(MIG) - /dev/null -prefix __ \
$(MIGFLAGS) $(user-MIGFLAGS) $(MIGFLAGS-$*) \
-i $(objpfx)tmp_ \
@@ -118,7 +125,7 @@ $(patsubst %,$(objpfx)%.ustamp,$(user-interfaces)): $(objpfx)%.ustamp:
$(patsubst %,$(objpfx)%.udeps,$(user-interfaces)):
$(objpfx)%.udeps: $(..)mach/Machrules
$(make-target-directory)
- echo '#include <$*.defs>' | \
+ $(include-%.defs) | \
$(CC) $(CPPFLAGS) -M -x c - | \
sed -e 's,- *:,$@ $(@:.udeps=.ustamp) $(@:.udeps=.uh) $(@:.udeps=.__h)\
$(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \
@@ -130,7 +137,7 @@ vpath %_server.c $(addprefix $(objpfx),$(sort $(dir $(server-interfaces))))
# Build the server stubs in $(objdir).
$(objpfx)%_server.c $(objpfx)%_server.h:
- echo '#include <$*.defs>' | \
+ $(include-%.defs) | \
$(MIG) - /dev/null -prefix _S_ \
$(MIGFLAGS) $(server-MIGFLAGS) $(MIGFLAGS-$*) \
$< -user /dev/null -header /dev/null \
@@ -141,14 +148,14 @@ $(objpfx)%_server.c $(objpfx)%_server.h:
$(objpfx)%.uh:; $(mig.uh)
define mig.uh
$(make-target-directory)
-echo '#include <$*.defs>' | \
+$(include-%.defs) | \
$(MIG) - /dev/null $(MIGFLAGS) \
-header $@ -server /dev/null -user /dev/null
endef
$(objpfx)%.__h:; $(mig.__h)
define mig.__h
$(make-target-directory)
-echo '#include <$*.defs>' | \
+$(include-%.defs) | \
$(MIG) - /dev/null $(MIGFLAGS) -prefix __ \
-header $@ -server /dev/null -user /dev/null
endef