kbuild: mkcompile_h: do not create .version
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Fri, 22 Sep 2017 05:31:14 +0000 (14:31 +0900)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 9 Oct 2017 14:28:46 +0000 (23:28 +0900)
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>
scripts/mkcompile_h

index fd8fdb91581dd45ccd9d4849428b8f87a855f26a..f1ee4ebd6518bebc946e490aa7a9558a33cce29f 100755 (executable)
@@ -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