diff options
author | Roland McGrath <roland@gnu.org> | 1996-05-12 16:38:08 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1996-05-12 16:38:08 +0000 |
commit | aa1075ea2f140dc7b2eec04199935b47111229db (patch) | |
tree | 30f0fe1cd77a1e4bcd999dff97eb61e4fc11166b /mach/Machrules | |
parent | d617ac4ee5563f36c6046729b324f78562b0f1e7 (diff) | |
download | glibc-aa1075ea2f140dc7b2eec04199935b47111229db.tar glibc-aa1075ea2f140dc7b2eec04199935b47111229db.tar.gz glibc-aa1075ea2f140dc7b2eec04199935b47111229db.tar.bz2 glibc-aa1075ea2f140dc7b2eec04199935b47111229db.zip |
Sun May 12 11:16:58 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* mach/Machrules (%.udeps rule): Write deps for %_server.[ch] too.
(%_server.[ch] rule): Don't depend on %.defs; use #include to get
installed .defs file.
* stdio-common/vfprintf.c (flockfile, funlockfile): Define to
nothing for stdio. Fix fUNlockfile -> funlockfile for libio.
* stdio-common/vfscanf.c: Likewise.
Sat May 11 13:43:41 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* hurd/hurdfault.c: Include faultexc_server.h instead of faultexc.h.
* mach/Machrules (%.ir rule): Don't produce deps for imports.
* elf/dl-fini.c (_dl_fini): Clear L->l_init_called after calling fn.
* Makerules (install): Depend on $(slibdir)/libc.so$(libc.so-version).
[!subdir] ($(libdir)/libc.so, $(common-objpfx)/libc-syms.so): Protect
these targets and install dep on $(libdir)/libc.so with this.
* hurd/Makefile: Removed all rules and defns for using code from Hurd
sources and installing headers from there.
* sysdeps/mach/hurd/errnos.awk: Set in_mach_errors to FILENAME when we
set it. In Mach error matching clause, only match if FILENAME is
still the same value.
* sysdeps/mach/hurd/Makefile: Don't include sysdeps/mach/Makefile;
$(mach-srcdir) no longer exists.
(hurd-srcdir): Variable removed.
(includes): Don't append -I$(hurd-srcdir).
(last-includes): Variable removed.
Remove vpath specs using $(hurd-srcdir).
(mach-errno-h): New canned sequence.
($(common-objpfx)errnos.d): New target, generated included makefile
to determine absolute file names of Mach headers to search for error
codes and set variable mach-errnos-deps.
($(common-objpfx)stamp-errnos): Depend on $(mach-errnos-deps) instead
of prior explicit list.
(generated): Add errnos.d, stamp-errnos.
* mach/Machrules (some-if-rtn): New variable and target; compute deps
of some if routine and make all if routines depend on that .d file
instead of static list of .h files.
* mach/Makefile (mach/mach_interface.defs,
mach/memory_object_user.defs): Targets removed.
($(objpfx)mach-syscalls.mk): Tweak this kludge so it doesn't depend
directly on Mach sources.
* sysdeps/mach/Makefile (mach-srcdir): Variable removed.
(includes): Don't append -I$(mach-srcdir).
Remove vpath specs using $(mach-srcdir).
* hurd/Makefile (server-interfaces): Add faultexc.
(sig): Remove it from here.
(fault%.[ch]): Rule removed.
(MIGFLAGS-faultexc): New variable.
* hurd/faultexc.defs: New file.
* mach/Machrules (%.ustamp rule): Pass $(MIGFLAGS-$*) to mig.
(%_server.[ch] rule): Likewise.
* mach/Makefile: Removed all rules and defns for using code from Mach
sources and installing headers from there.
* Makeconfig [$(build-shared)=yes] (link-libc): Append
$(libc.so-version) to libc.so.
* mach/Machrules (%.ustamp rule): Don't depend on %.defs.
(%.udeps): New rule parallel to that one, generating included
makefiles with -M output from `#include <%.defs>'.
* Makerules (sed-remove-objpfx): Remove space before \ at eol.
Diffstat (limited to 'mach/Machrules')
-rw-r--r-- | mach/Machrules | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/mach/Machrules b/mach/Machrules index ef5809b86c..f7f6d2df63 100644 --- a/mach/Machrules +++ b/mach/Machrules @@ -81,19 +81,14 @@ endif # other useful pattern) causes the rule for `host_info' to also match # `xxx_host_info', and analogous lossage. # -# While we're at it, we figure out the imports used by %.defs and give them -# as dependencies of the object files for the generated RPC_*.c files. -# # Depend on %.h just so they will be built from %.uh in the # makefile-rebuilding run which builds %.ir; otherwise, %.uh is built as an # intermediate in order to make %.ir and then removed before re-exec, when # %.uh is built all over again to build %.h. $(objpfx)%.ir: $(objpfx)%.uh $(objpfx)%.h (awk "NF == 4 && (\$$2 == \"Routine\" || \$$2 == \"SimpleRoutine\")\ - { printf \"$*-calls += %s\\n\", \$$3 } \ - /^#include/ { printf \"$*-imports += %s\\n\", \$$2 }" $< ;\ + { printf \"$*-calls += %s\\n\", \$$3 }" $< ;\ echo '$$($*-calls:%=$$(objpfx)R\%C_%.c): $$(objpfx)$*.ustamp ;';\ - echo '$$($*-calls:%=$$(objpfx)RPC_%.o): $$($*-imports:<%>=%)' ;\ ) > $@-new mv $@-new $@ vpath Machrules ../mach # Find ourselves. @@ -106,9 +101,12 @@ endef endif # Not an implicit rule so the stamps are never removed as intermediates! -$(patsubst %,$(objpfx)%.ustamp,$(user-interfaces)): $(objpfx)%.ustamp: %.defs - $(MIG) $< $(MIGFLAGS) $(user-MIGFLAGS) \ - -prefix __ -i $(objpfx)tmp_ \ +$(patsubst %,$(objpfx)%.ustamp,$(user-interfaces)): $(objpfx)%.ustamp: + rm -f $@ + echo '#include <$*.defs>' | \ + $(MIG) - /dev/null -prefix __ \ + $(MIGFLAGS) $(user-MIGFLAGS) $(MIGFLAGS-$*) \ + -i $(objpfx)tmp_ \ -server /dev/null -user /dev/null -header /dev/null for call in $($*-calls); do \ $(transform-user-stub) \ @@ -116,15 +114,24 @@ $(patsubst %,$(objpfx)%.ustamp,$(user-interfaces)): $(objpfx)%.ustamp: %.defs $(objpfx)RPC_$${call}.c; \ done touch $@ +-include $(patsubst %,$(objpfx)%.udeps,$(user-interfaces)) +$(patsubst %,$(objpfx)%.udeps,$(user-interfaces)): $(objpfx)%.udeps: + echo '#include <$*.defs>' | \ + $(CC) $(CPPFLAGS) -M -x c - | \ + sed -e 's,- *:,$@ $(@:.udeps=.ustamp) \ + $(@:.udeps=_server.c) $(@:.udeps=_server.h):,' \ + $(sed-remove-objpfx) > $@.new + mv -f $@.new $@ # Look for the server stub files where they will be written. vpath %_server.c $(addprefix $(objpfx),$(sort $(dir $(server-interfaces)))) # Build the server stubs in $(objdir). -$(objpfx)%_server.c $(objpfx)%_server.h: %.defs - $(MIG) $< $(MIGFLAGS) $(server-MIGFLAGS) \ - -prefix _S_ \ - -user /dev/null -header /dev/null \ +$(objpfx)%_server.c $(objpfx)%_server.h: + echo '#include <$*.defs>' | \ + $(MIG) - /dev/null -prefix _S_ \ + $(MIGFLAGS) $(server-MIGFLAGS) $(MIGFLAGS-$*) \ + $< -user /dev/null -header /dev/null \ -server $(@:.h=.c) -sheader $(@:.c=.h) # To get header files that declare both the straight and __ functions, @@ -176,18 +183,14 @@ interface-headers: $(interface-headers) # dependencies ahead of time anyway because they're boilerplate. omit-deps += $(interface-routines) -# Specify the static dependencies of the generated files. -$(foreach o,$(object-suffixes),\ -$(foreach if,$(user-interfaces),$($(if)-calls:%=$(objpfx)RPC_%$o))): \ - mach/boolean.h mach/kern_return.h mach/message.h mach/notify.h \ - mach/mach_types.h mach/mig_errors.h mach/mig_support.h mach/msg_type.h \ - $(..)libc-symbols.h $(objpfx)config.h -$(foreach o,$(object-suffixes),\ -$(server-interfaces:%=$(objpfx)%$o)): \ - mach/boolean.h mach/kern_return.h mach/message.h mach/mig_errors.h \ - mach/mig_support.h mach/std_types.h -# The MiG-generated sources also depend on the imports in their .defs files. -# These dependencies are generated into the .ir files above. +# Choose any single module generated by MiG. We will compute this module's +# dependencies and then assume all other MiG-generated modules depend on the +# same headers. +some-if-rtn := $(firstword $(interface-routines)) +ifdef some-if-rtn +$(foreach o,$(object-suffixes),$(interfaces-routines:%=%$o)): $(some-if-rtn).d +generated += $(some-if-rtn).d +endif # If defined, $(interface-library) is `libNAME'. It is to be a library # containing all the MiG-generated functions for the specified interfaces. |