aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Beulich <JBeulich@novell.com>2005-09-08 11:07:35 -0400
committerSam Ravnborg <sam@mars.ravnborg.org>2005-09-10 08:17:45 -0400
commit4e25d8bb9550fb5912165196fe8502cdb831a336 (patch)
treeabc710a7bec701d5890742970b687b70d37c4b0c
parent7b49bb9aff8b14d15da58111d8908c877c0a525e (diff)
[PATCH] kbuild: adjust .version updating
In order to maintain a more correct build number, updates to the version number should only be commited after a successful link of vmlinux, not before (so that errors in the link process don't lead to pointless increments). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r--Makefile10
1 files changed, 8 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 6a405882b1f7..485a11a1985f 100644
--- a/Makefile
+++ b/Makefile
@@ -641,8 +641,13 @@ quiet_cmd_vmlinux__ ?= LD $@
641# Generate new vmlinux version 641# Generate new vmlinux version
642quiet_cmd_vmlinux_version = GEN .version 642quiet_cmd_vmlinux_version = GEN .version
643 cmd_vmlinux_version = set -e; \ 643 cmd_vmlinux_version = set -e; \
644 . $(srctree)/scripts/mkversion > .tmp_version; \ 644 if [ ! -r .version ]; then \
645 mv -f .tmp_version .version; \ 645 rm -f .version; \
646 echo 1 >.version; \
647 else \
648 mv .version .old_version; \
649 expr 0$$(cat .old_version) + 1 >.version; \
650 fi; \
646 $(MAKE) $(build)=init 651 $(MAKE) $(build)=init
647 652
648# Generate System.map 653# Generate System.map
@@ -756,6 +761,7 @@ endif # ifdef CONFIG_KALLSYMS
756# vmlinux image - including updated kernel symbols 761# vmlinux image - including updated kernel symbols
757vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE 762vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
758 $(call if_changed_rule,vmlinux__) 763 $(call if_changed_rule,vmlinux__)
764 $(Q)rm -f .old_version
759 765
760# The actual objects are generated when descending, 766# The actual objects are generated when descending,
761# make sure no implicit rule kicks in 767# make sure no implicit rule kicks in