| Kernel v2.2.21 /Rules.make |
|---|
 2.2.21
 Rules.make
diff -u --new-file --recursive v2.2.20/Rules.make linux/Rules.make
--- v2.2.20/Rules.make Mon May 20 16:09:58 2002
+++ linux/Rules.make Mon May 20 16:32:34 2002
@@ -230,8 +230,16 @@
$(addprefix $(MODINCL)/,$(SYMTAB_OBJS:.o=.ver)): $(TOPDIR)/include/linux/autoconf.h
-$(TOPDIR)/include/linux/modversions.h: $(addprefix $(MODINCL)/,$(SYMTAB_OBJS:.o=.ver))
- @echo updating $(TOPDIR)/include/linux/modversions.h
+# updates .ver files but not modversions.h
+fastdep: $(addprefix $(MODINCL)/,$(SYMTAB_OBJS:.o=.ver))
+
+# updates .ver files and modversions.h like before (is this needed?)
+dep: fastdep update-modverfile
+
+endif # SYMTAB_OBJS
+
+# update modversions.h, but only if it would change
+update-modverfile:
@(echo "#ifndef _LINUX_MODVERSIONS_H";\
echo "#define _LINUX_MODVERSIONS_H"; \
echo "#include <linux/modsetver.h>"; \
@@ -240,11 +248,14 @@
if [ -f $$f ]; then echo "#include <linux/modules/$${f}>"; fi; \
done; \
echo "#endif"; \
- ) > $@
-
-dep fastdep: $(TOPDIR)/include/linux/modversions.h
-
-endif # SYMTAB_OBJS
+ ) > $(TOPDIR)/include/linux/modversions.h.tmp
+ @if [ -r $(TOPDIR)/include/linux/modversions.h ] && cmp -s $(TOPDIR)/include/linux/modversions.h $(TOPDIR)/include/linux/modvers+
ions.h.tmp; then \
+ echo $(TOPDIR)/include/linux/modversions.h was not updated; \
+ rm -f $(TOPDIR)/include/linux/modversions.h.tmp; \
+ else \
+ echo $(TOPDIR)/include/linux/modversions.h was updated; \
+ mv -f $(TOPDIR)/include/linux/modversions.h.tmp $(TOPDIR)/include/linux/modversions.h; \
+ fi
$(M_OBJS): $(TOPDIR)/include/linux/modversions.h
ifdef MAKING_MODULES
|