Makefile: Calculate the correct kvmtool version
Command 'lvm version' works incorrect. It is expected to print: # ./lvm version # kvm tool [KVMTOOLS_VERSION] but the KVMTOOLS_VERSION is missed: # ./lvm version # kvm tool The KVMTOOLS_VERSION is defined in the KVMTOOLS-VERSION-FILE file which is included at the end of Makefile. Since the CFLAGS is a 'Simply expanded variables' which means CFLAGS is only scanned once. So the definetion of KVMTOOLS_VERSION at the end of Makefile would not scanned by CFLAGS. So the '-DKVMTOOLS_VERSION=' remains empty. I fixed the bug by moving the '-include $(OUTPUT)KVMTOOLS-VERSION-FILE' before the CFLAGS. Signed-off-by:haibiao.xiao <xiaohaibiao331@outlook.com> Tested-by:
Alexandru Elisei <alexandru.elisei@arm.com> Link: https://lore.kernel.org/r/20211210030708.288066-1-haibiao.xiao@zstack.io Signed-off-by:
Will Deacon <will@kernel.org>
Loading
Please register or sign in to comment