Remake and more remake of files (solved)

From: Russell King (rmk@arm.linux.org.uk)
Date: Sat Jul 15 2000 - 15:34:57 EST


(or, "if at first you do succeed, try and try again")

As some people will recall, I posted a message a while ago about excessive
files being remade when in fact not much had changed. I've finally solved
the mistery!

It is to do with the way my kernels get built by my buildscripts. They
effectively do (each one of these lines can be selected via options to
the buildscripts):

        (other usual make stuff)
        make linuxsubdirs
        make zImage SUBDIRS=
        make modules

However, when linuxsubdirs is run, linux/include/version.h is not up to date.
When zImage happens, it gets updated, and then the modules get built, at which
point, modules.h then gets a new timestamp.

Next time around, files that depend on either modules.h or version.h get
rebuilt, dispite actually being up to date.

Here is a patch which fixes this, so that we can be sure that version.h is
up to date with any changes before we build any files:

--- orig/Makefile Sat Jul 15 00:09:13 2000
+++ linux/Makefile Sat Jul 15 21:28:17 2000
@@ -230,7 +230,7 @@
 
 linuxsubdirs: $(patsubst %, _dir_%, $(SUBDIRS))
 
-$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/config/MARKER
+$(patsubst %, _dir_%, $(SUBDIRS)) : dummy include/linux/version.h include/config/MARKER
         $(MAKE) -C $(patsubst _dir_%, %, $@)
 
 $(TOPDIR)/include/linux/version.h: include/linux/version.h

   _____
  |_____| ------------------------------------------------- ---+---+-
  | | Russell King rmk@arm.linux.org.uk --- ---
  | | | | http://www.arm.linux.org.uk/~rmk/aboutme.html / / |
  | +-+-+ --- -+-
  / | THE developer of ARM Linux |+| /|\
 / | | | --- |
    +-+-+ ------------------------------------------------- /\\\ |

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:22 EST