qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <laurent@vivier.eu>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>, qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH] build-sys: Move the print-variable rule to rules.mak
Date: Mon, 9 Mar 2020 12:25:53 +0100	[thread overview]
Message-ID: <e044e2cf-cb41-a2fc-f27f-cd54d76cd4bd@vivier.eu> (raw)
In-Reply-To: <20200306170456.21977-1-philmd@redhat.com>

Le 06/03/2020 à 18:04, Philippe Mathieu-Daudé a écrit :
> Currently the print-variable rule can only be used in the
> root directory:
> 
>   $ make print-vhost-user-json-y
>   vhost-user-json-y= contrib/vhost-user-gpu/50-qemu-gpu.json tools/virtiofsd/50-qemu-virtiofsd.json
> 
>   $ make -C i386-softmmu print-obj-y
>   make: Entering directory 'build/i386-softmmu'
>   make: *** No rule to make target 'print-obj-y'.  Stop.
>   make: Leaving directory 'build/i386-softmmu'
> 
> Move it to rules.mak so we can use it from other directories:
> 
>   $ make -C i386-softmmu print-obj-y
>   make: Entering directory 'build/i386-softmmu'
>   obj-y=qapi-introspect.o qapi-types-machine-target.o qapi-types-misc-target.o qapi-types.o qapi-visit-machine-target.o qapi-visit-misc-target.o qapi-visit.o qapi-events-machine-target.o qapi-events-misc-target.o qapi-events.o qapi-commands-machine-target.o qapi-commands-misc-target.o qapi-commands.o qapi-init-commands.o
>   make: Leaving directory 'build/i386-softmmu'
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  Makefile  | 3 ---
>  rules.mak | 3 +++
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 9d4b224126..fdc5d29bb9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -15,9 +15,6 @@ UNCHECKED_GOALS := %clean TAGS cscope ctags dist \
>      help check-help print-% \
>      docker docker-% vm-help vm-test vm-build-%
>  
> -print-%:
> -	@echo '$*=$($*)'
> -
>  # All following code might depend on configuration variables
>  ifneq ($(wildcard config-host.mak),)
>  # Put the all: rule here so that config-host.mak can contain dependencies.
> diff --git a/rules.mak b/rules.mak
> index e39b073d46..694865b63e 100644
> --- a/rules.mak
> +++ b/rules.mak
> @@ -435,3 +435,6 @@ sentinel = .$(subst $(SPACE),_,$(subst /,_,$1)).sentinel.
>  atomic = $(eval $1: $(call sentinel,$1) ; @:) \
>           $(call sentinel,$1) : $2 ; @touch $$@ \
>           $(foreach t,$1,$(if $(wildcard $t),,$(shell rm -f $(call sentinel,$1))))
> +
> +print-%:
> +	@echo '$*=$($*)'
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



      parent reply	other threads:[~2020-03-09 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 17:04 [PATCH] build-sys: Move the print-variable rule to rules.mak Philippe Mathieu-Daudé
2020-03-06 18:44 ` no-reply
2020-03-06 22:03 ` Marc-André Lureau
2020-03-09 11:25 ` Laurent Vivier [this message]

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=e044e2cf-cb41-a2fc-f27f-cd54d76cd4bd@vivier.eu \
    --to=laurent@vivier.eu \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).