mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
[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>
This commit is contained in:
parent
7b49bb9aff
commit
4e25d8bb95
1 changed files with 8 additions and 2 deletions
10
Makefile
10
Makefile
|
@ -641,8 +641,13 @@ quiet_cmd_vmlinux__ ?= LD $@
|
||||||
# Generate new vmlinux version
|
# Generate new vmlinux version
|
||||||
quiet_cmd_vmlinux_version = GEN .version
|
quiet_cmd_vmlinux_version = GEN .version
|
||||||
cmd_vmlinux_version = set -e; \
|
cmd_vmlinux_version = set -e; \
|
||||||
. $(srctree)/scripts/mkversion > .tmp_version; \
|
if [ ! -r .version ]; then \
|
||||||
mv -f .tmp_version .version; \
|
rm -f .version; \
|
||||||
|
echo 1 >.version; \
|
||||||
|
else \
|
||||||
|
mv .version .old_version; \
|
||||||
|
expr 0$$(cat .old_version) + 1 >.version; \
|
||||||
|
fi; \
|
||||||
$(MAKE) $(build)=init
|
$(MAKE) $(build)=init
|
||||||
|
|
||||||
# Generate System.map
|
# Generate System.map
|
||||||
|
@ -756,6 +761,7 @@ endif # ifdef CONFIG_KALLSYMS
|
||||||
# vmlinux image - including updated kernel symbols
|
# vmlinux image - including updated kernel symbols
|
||||||
vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
|
vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE
|
||||||
$(call if_changed_rule,vmlinux__)
|
$(call if_changed_rule,vmlinux__)
|
||||||
|
$(Q)rm -f .old_version
|
||||||
|
|
||||||
# The actual objects are generated when descending,
|
# The actual objects are generated when descending,
|
||||||
# make sure no implicit rule kicks in
|
# make sure no implicit rule kicks in
|
||||||
|
|
Loading…
Reference in a new issue