]> git.hungrycats.org Git - linux/commitdiff
kbuild: Don't rebuild if vmlinux if nothing changed - fix
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sat, 1 Jun 2002 14:06:04 +0000 (09:06 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Sat, 1 Jun 2002 14:06:04 +0000 (09:06 -0500)
We would rebuild vmlinux if the command line to do so changed since
the last build. Unfortunately, we forgot to read the old command line,
so we always rebuilt it.

Makefile

index 14dafa9a2b04486b64e257d6f2fa75ce13b5dc92..f36a93cddfec548e0a476a7aa15e9861e8dd616f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -484,6 +484,17 @@ sums:
 # FIXME Should go into a make.lib or something 
 # ---------------------------------------------------------------------------
 
+# read all saved command lines
+
+cmd_files := $(wildcard .*.cmd)
+ifneq ($(cmd_files),)
+  include $(cmd_files)
+endif
+
+# Usage: $(call if_changed_rule,foo)
+# will check if $(cmd_foo) changed, or any of the prequisites changed,
+# and if so will execute $(rule_foo)
+
 if_changed_rule = $(if $(strip $? \
                               $(filter-out $(cmd_$(1)),$(cmd_$(@F)))\
                               $(filter-out $(cmd_$(@F)),$(cmd_$(1)))),\