]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: fix "cat: .version: No such file or directory"
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 22 Nov 2022 14:39:02 +0000 (23:39 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Thu, 24 Nov 2022 00:26:02 +0000 (09:26 +0900)
commit2dbcd68a9f44c4a7b94823f1ed0045bc670aa410
tree32d92150cb4f77ab71464c694b40b31f31617c1c
parent3c3b110099bc6351d8d247d699ef15d608eea59d
kbuild: fix "cat: .version: No such file or directory"

Since commit 348a61529228 ("kbuild: build init/built-in.a just once"),
the .version file is not touched at all when KBUILD_BUILD_VERSION is
given.

If KBUILD_BUILD_VERSION is specified and the .version file is missing
(for example right after 'make mrproper'), "No such file or director"
is shown. Even if the .version exists, it is irrelevant to the version
of the current build.

  $ make -j$(nproc) KBUILD_BUILD_VERSION=100 mrproper defconfig all
    [ snip ]
    BUILD   arch/x86/boot/bzImage
  cat: .version: No such file or directory
  Kernel: arch/x86/boot/bzImage is ready  (#)

Show KBUILD_BUILD_VERSION if it is given.

Fixes: 348a61529228 ("kbuild: build init/built-in.a just once")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
arch/microblaze/Makefile
arch/x86/boot/Makefile