summaryrefslogtreecommitdiffstats
path: root/scripts/link-vmlinux.sh
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-22 14:31:13 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-10-09 23:28:46 +0900
commit278ae6040397f37fa6a96a6b86ed02d4762080a7 (patch)
treef8796d31b30bf077b0868a49bc8a0dabf401bde0 /scripts/link-vmlinux.sh
parentf231e43333124d92a82acd19431f8104b8e48a75 (diff)
downloadlinux-278ae6040397f37fa6a96a6b86ed02d4762080a7.tar.gz
linux-278ae6040397f37fa6a96a6b86ed02d4762080a7.tar.bz2
linux-278ae6040397f37fa6a96a6b86ed02d4762080a7.zip
kbuild: link-vmlinux.sh: simplify .version increment
Since commit 1f2bfbd00e46 ("kbuild: link of vmlinux moved to a script"), it is easy to increment .version without using a temporary file .old_version. I do not see anybody who creates the .tmp_version. Probably it is a left-over of commit 4e25d8bb9550fb ("[PATCH] kbuild: adjust .version updating"). Just remove it. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/link-vmlinux.sh')
-rwxr-xr-xscripts/link-vmlinux.sh15
1 files changed, 5 insertions, 10 deletions
diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
index e7b7eee31538..0cdb25b66e6f 100755
--- a/scripts/link-vmlinux.sh
+++ b/scripts/link-vmlinux.sh
@@ -187,10 +187,8 @@ sortextable()
# Delete output files in case of error
cleanup()
{
- rm -f .old_version
rm -f .tmp_System.map
rm -f .tmp_kallsyms*
- rm -f .tmp_version
rm -f .tmp_vmlinux*
rm -f built-in.o
rm -f System.map
@@ -238,12 +236,12 @@ esac
# Update version
info GEN .version
-if [ ! -r .version ]; then
- rm -f .version;
- echo 1 >.version;
+if [ -r .version ]; then
+ VERSION=$(expr 0$(cat .version) + 1)
+ echo $VERSION > .version
else
- mv .version .old_version;
- expr 0$(cat .old_version) + 1 >.version;
+ rm -f .version
+ echo 1 > .version
fi;
# final build of init/
@@ -331,6 +329,3 @@ if [ -n "${CONFIG_KALLSYMS}" ]; then
exit 1
fi
fi
-
-# We made a new kernel - delete old version file
-rm -f .old_version