• Masahiro Yamada's avatar
    kbuild: fix "cat: .version: No such file or directory" · 083cad78
    Masahiro Yamada authored
    Since commit 2df8220c ("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: 2df8220c ("kbuild: build init/built-in.a just once")
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarNicolas Schier <nicolas@fjasle.eu>
    083cad78
Makefile 5.25 KB