Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.2.21 /Rules.make

Filename:/Rules.make
Lines Added:18
Lines Deleted:7
Also changed in: (Previous) 2.2.21rc4  2.2.21rc3  2.2.21rc2  2.2.21rc1  2.2.21pre4  2.2.21pre3 
(Following) 2.4.21-pre3-ac1  2.4.21-pre3-ac2  2.4.21-pre3-ac3  2.4.21-pre3-ac4  2.4.21-pre3-ac5  2.4.21-pre4-ac1 

Location
[  2.2.21
   o  Rules.make

Patch

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


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.