diff mbox series

[2/2] kbuild: mkcompile_h: do not create .version

Message ID 1506058274-30516-2-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 37131ec4f9cb60750be6f75fca20ff6bbf1b8efd
Headers show
Series [1/2] kbuild: link-vmlinux.sh: simplify .version increment | expand

Commit Message

Masahiro Yamada Sept. 22, 2017, 5:31 a.m. UTC
This script need not 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 | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

-- 
2.7.4

Comments

Masahiro Yamada Oct. 5, 2017, 8:23 p.m. UTC | #1
2017-09-22 14:31 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> This script need not 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>



Applied to linux-kbuild/kbuild.



-- 
Best Regards
Masahiro Yamada
diff mbox series

Patch

diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h
index fd8fdb9..f1ee4eb 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