[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/12] build-sys: add a rule to print a variable
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 03/12] build-sys: add a rule to print a variable |
Date: |
Fri, 8 Dec 2017 13:21:40 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 12/07/2017 06:58 PM, Marc-André Lureau wrote:
> $ make print-CFLAGS
> CFLAGS=-fsanitize=address -Og -g
>
> Trick from various sources:
> https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile
> https://www.cmcrossroads.com/article/printing-value-makefile-variable
>
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> Makefile | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
Slick!
Does it need to be documented anywhere that we have this useful
debugging aid in place?
Reviewed-by: Eric Blake <address@hidden>
> diff --git a/Makefile b/Makefile
> index ab0354c153..80683e8c8b 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -6,7 +6,10 @@ BUILD_DIR=$(CURDIR)
> # Before including a proper config-host.mak, assume we are in the source tree
> SRC_PATH=.
>
> -UNCHECKED_GOALS := %clean TAGS cscope ctags docker docker-% help
> +UNCHECKED_GOALS := %clean TAGS cscope ctags docker docker-% help print-%
> +
> +print-%:
> + @echo '$*=$($*)'
>
> # All following code might depend on configuration variables
> ifneq ($(wildcard config-host.mak),)
>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH 00/12] Various build-sys and ASAN related fixes, Marc-André Lureau, 2017/12/07
- [Qemu-devel] [PATCH 01/12] build-sys: fix qemu-ga -pthread linking, Marc-André Lureau, 2017/12/07
- [Qemu-devel] [PATCH 02/12] build-sys: silence make by default, Marc-André Lureau, 2017/12/07
- [Qemu-devel] [PATCH 03/12] build-sys: add a rule to print a variable, Marc-André Lureau, 2017/12/07
- Re: [Qemu-devel] [PATCH 03/12] build-sys: add a rule to print a variable,
Eric Blake <=
- [Qemu-devel] [PATCH 04/12] build-sys: add AddressSanitizer when --enable-debug if possible, Marc-André Lureau, 2017/12/07
- [Qemu-devel] [PATCH 05/12] tests: fix check-qobject leak:, Marc-André Lureau, 2017/12/07
- [Qemu-devel] [PATCH 07/12] readline: add a free function, Marc-André Lureau, 2017/12/07
- [Qemu-devel] [PATCH 06/12] vl: fix direct firmware directories leak, Marc-André Lureau, 2017/12/07
- [Qemu-devel] [PATCH 08/12] tests: fix migration-test leak, Marc-André Lureau, 2017/12/07
- [Qemu-devel] [PATCH 09/12] crypto: fix stack-buffer-overflow error, Marc-André Lureau, 2017/12/07