From 5de2e50891f0406244f4dcb7af009dce6213a0ea Mon Sep 17 00:00:00 2001 From: Thomas Bushnell Date: Fri, 2 Jul 1999 02:33:31 +0000 Subject: 1999-07-01 Thomas Bushnell, BSG * i386/linux/Makefile.in: For each .o file in $(linux-objs) include a corresponding .d file, unless `no_deps' is `t'. (make-deps): New function. (%.d): New pattern rules for building %.d from %.c and %.S. --- ChangeLog | 7 +++++++ i386/linux/Makefile.in | 25 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/ChangeLog b/ChangeLog index 1ba950d..cb96bf6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-07-01 Thomas Bushnell, BSG + + * i386/linux/Makefile.in: For each .o file in $(linux-objs) + include a corresponding .d file, unless `no_deps' is `t'. + (make-deps): New function. + (%.d): New pattern rules for building %.d from %.c and %.S. + 1999-06-29 Thomas Bushnell, BSG * vm/vm_resident.c (vm_page_grab): Don't bounce requests when diff --git a/i386/linux/Makefile.in b/i386/linux/Makefile.in index cdcabb3..80d008d 100644 --- a/i386/linux/Makefile.in +++ b/i386/linux/Makefile.in @@ -205,3 +205,28 @@ mostlyclean: distclean maintainer-clean: mostlyclean rm -f $(srcdir)/configure + + + +# +# Dependency generation +# + +# Include dependency files +ifneq ($(no_deps),t) + +# For each .o file we need a .d file. +-include $(subst .o,.d,$(filter %.o,$(linux-objs))) /dev/null + +endif + +# Generic rule for $(CC) based compilation for making dependencies +define make-deps +set -e; $(CC) $(CFLAGS) $(CPPFLAGS) -M -MG $< | \ + sed > $@.new -e 's/$*\.o:/$*.o $@:/' +mv -f $@.new $@ +endef + +%.d: %.c $(before-compile); $(make-deps) +%.d: %.S $(before-compile); $(make-deps) + -- cgit v1.2.3