All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Elisei <alexandru.elisei@arm.com>
To: "haibiao.xiao" <haibiao.xiao@zstack.io>
Cc: kvm@vger.kernel.org, will@kernel.org,
	julien.thierry.kdev@gmail.com,
	"haibiao.xiao" <xiaohaibiao331@outlook.com>
Subject: Re: [PATCH kvmtool] Makefile: 'lvm version' works incorrect. Because CFLAGS can not get sub-make variable $(KVMTOOLS_VERSION)
Date: Wed, 8 Dec 2021 16:38:17 +0000	[thread overview]
Message-ID: <YbDfecTFlOfPIUs4@monolith.localdoman> (raw)
In-Reply-To: <20211204061436.36642-1-haibiao.xiao@zstack.io>

Hi,

On Sat, Dec 04, 2021 at 02:14:36PM +0800, haibiao.xiao wrote:
> From: "haibiao.xiao" <xiaohaibiao331@outlook.com>

The subject line should be a summary of what the patch does (and perhaps
why it does it), not a description of what is broken. How about this:

Makefile: Calculate the correct kvmtool version

or something else that you prefer. Tested the patch and it works as
advertised:

Tested-by: Alexandru Elisei <alexandru.elisei@arm.com>

Thanks,
Alex

> 
> 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>
> ---
>  Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index bb7ad3e..9afb5e3 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -17,6 +17,7 @@ export E Q
>  
>  include config/utilities.mak
>  include config/feature-tests.mak
> +-include $(OUTPUT)KVMTOOLS-VERSION-FILE
>  
>  CC	:= $(CROSS_COMPILE)gcc
>  CFLAGS	:=
> @@ -559,5 +560,4 @@ ifneq ($(MAKECMDGOALS),clean)
>  
>  KVMTOOLS-VERSION-FILE:
>  	@$(SHELL_PATH) util/KVMTOOLS-VERSION-GEN $(OUTPUT)
> --include $(OUTPUT)KVMTOOLS-VERSION-FILE
> -endif
> +endif
> \ No newline at end of file
> -- 
> 2.32.0
> 

  reply	other threads:[~2021-12-08 16:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04  6:14 [PATCH kvmtool] Makefile: 'lvm version' works incorrect. Because CFLAGS can not get sub-make variable $(KVMTOOLS_VERSION) haibiao.xiao
2021-12-08 16:38 ` Alexandru Elisei [this message]
2021-12-09  3:31   ` haibiao.xiao
2021-12-09 11:00     ` Alexandru Elisei
2021-12-09 15:57 ` Andre Przywara
2021-12-10  2:55   ` haibiao.xiao
2021-12-10 11:00     ` Andre Przywara
2021-12-13  3:19       ` haibiao.xiao
  -- strict thread matches above, loose matches on Subject: below --
2021-07-05  4:46 haibiao.xiao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YbDfecTFlOfPIUs4@monolith.localdoman \
    --to=alexandru.elisei@arm.com \
    --cc=haibiao.xiao@zstack.io \
    --cc=julien.thierry.kdev@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=will@kernel.org \
    --cc=xiaohaibiao331@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.