summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-02 02:33:31 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-02 02:33:31 +0000
commit5de2e50891f0406244f4dcb7af009dce6213a0ea (patch)
tree2a55338d39cdc6e5cac71aefe56ec15c9f584b75
parent9b4552a22d3abb08bb25f4e0035b164fce358d99 (diff)
1999-07-01 Thomas Bushnell, BSG <tb@mit.edu>
* 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.
-rw-r--r--ChangeLog7
-rw-r--r--i386/linux/Makefile.in25
2 files changed, 32 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1ba950d..cb96bf6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+1999-07-01 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * 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 <tb@mit.edu>
* 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)
+