summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-22 07:31:14 +0200
committerMasahiro Yamada <yamada.masahiro@socionext.com>2017-10-09 16:28:46 +0200
commit37131ec4f9cb60750be6f75fca20ff6bbf1b8efd (patch)
treed61347048afeaea692934aebb377662df493fc51 /scripts
parentkbuild: link-vmlinux.sh: simplify .version increment (diff)
downloadlinux-37131ec4f9cb60750be6f75fca20ff6bbf1b8efd.tar.xz
linux-37131ec4f9cb60750be6f75fca20ff6bbf1b8efd.zip
kbuild: mkcompile_h: do not create .version
This script does not need to create .version; it will be created by scripts/link-vmlinux.sh later. Clean-up the code slightly. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkcompile_h7
1 files changed, 1 insertions, 6 deletions
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index fd8fdb91581d..f1ee4ebd6518 100755
--- a/scripts/mkcompile_h
+++ b/scripts/mkcompile_h
@@ -27,12 +27,7 @@ LC_ALL=C
export LC_ALL
if [ -z "$KBUILD_BUILD_VERSION" ]; then
- if [ -r .version ]; then
- VERSION=`cat .version`
- else
- VERSION=0
- echo 0 > .version
- fi
+ VERSION=$(cat .version 2>/dev/null || echo 1)
else
VERSION=$KBUILD_BUILD_VERSION
fi