diff options
author | Jan Beulich <JBeulich@novell.com> | 2005-09-08 17:07:35 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2005-09-10 14:17:45 +0200 |
commit | 4e25d8bb9550fb5912165196fe8502cdb831a336 (patch) | |
tree | abc710a7bec701d5890742970b687b70d37c4b0c /Makefile | |
parent | 7b49bb9aff8b14d15da58111d8908c877c0a525e (diff) | |
download | linux-4e25d8bb9550fb5912165196fe8502cdb831a336.tar.gz linux-4e25d8bb9550fb5912165196fe8502cdb831a336.tar.xz |
[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>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -641,8 +641,13 @@ quiet_cmd_vmlinux__ ?= LD $@ # Generate new vmlinux version quiet_cmd_vmlinux_version = GEN .version cmd_vmlinux_version = set -e; \ - . $(srctree)/scripts/mkversion > .tmp_version; \ - mv -f .tmp_version .version; \ + if [ ! -r .version ]; then \ + rm -f .version; \ + echo 1 >.version; \ + else \ + mv .version .old_version; \ + expr 0$$(cat .old_version) + 1 >.version; \ + fi; \ $(MAKE) $(build)=init # Generate System.map @@ -756,6 +761,7 @@ endif # ifdef CONFIG_KALLSYMS # vmlinux image - including updated kernel symbols vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE $(call if_changed_rule,vmlinux__) + $(Q)rm -f .old_version # The actual objects are generated when descending, # make sure no implicit rule kicks in |