Skip to content
Commit 642f35bf authored by haibiao.xiao's avatar haibiao.xiao Committed by Will Deacon
Browse files

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: default avatarhaibiao.xiao <xiaohaibiao331@outlook.com>
Tested-by: Alexandru Elisei's avatarAlexandru Elisei <alexandru.elisei@arm.com>
Link: https://lore.kernel.org/r/20211210030708.288066-1-haibiao.xiao@zstack.io


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 7a60af05
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment