From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, famz@redhat.com, eblake@redhat.com,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrange" <berrange@redhat.com>
Subject: [Qemu-devel] [PATCH v3 03/18] build-sys: add a rule to print a variable
Date: Thu, 4 Jan 2018 17:05:08 +0100 [thread overview]
Message-ID: <20180104160523.22995-4-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20180104160523.22995-1-marcandre.lureau@redhat.com>
$ 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 <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
---
Makefile | 5 ++++-
docs/devel/build-system.txt | 13 +++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 1671db3bdd..f26ef1b1df 100644
--- a/Makefile
+++ b/Makefile
@@ -8,9 +8,12 @@ SRC_PATH=.
UNCHECKED_GOALS := %clean TAGS cscope ctags dist \
html info pdf txt \
- help check-help \
+ help check-help print-% \
docker docker-% 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/docs/devel/build-system.txt b/docs/devel/build-system.txt
index 386ef36ee3..52501f2ad9 100644
--- a/docs/devel/build-system.txt
+++ b/docs/devel/build-system.txt
@@ -510,3 +510,16 @@ default-configs/$TARGET-NAME file as input.
This is the entrypoint used when make recurses to build a single system
or userspace emulator target. It is merely a symlink back to the
Makefile.target in the top level.
+
+
+Useful make targets
+===================
+
+- help
+
+ Print a help message for the most common build targets.
+
+- print-VAR
+
+ Print the value of the variable VAR. Useful for debugging the build
+ system.
--
2.15.1.355.g36791d7216
next prev parent reply other threads:[~2018-01-04 16:07 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-04 16:05 [Qemu-devel] [PATCH v3 00/18] Various build-sys and sanitizer related fixes Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 01/18] build-sys: fix qemu-ga -pthread linking Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 02/18] build-sys: silence make by default or V=0 Marc-André Lureau
2018-01-04 16:05 ` Marc-André Lureau [this message]
2018-01-04 16:15 ` [Qemu-devel] [PATCH v3 03/18] build-sys: add a rule to print a variable Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 04/18] build-sys: compile with -Og or -O1 when --enable-debug Marc-André Lureau
2018-01-04 17:17 ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 05/18] tests/docker: add some sanitizers to fedora dockerfile Marc-André Lureau
2018-01-04 17:11 ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 06/18] tests/docker: add test-debug Marc-André Lureau
2018-01-04 17:16 ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 07/18] build-sys: add some sanitizers when --enable-debug if possible Marc-André Lureau
2018-01-04 17:07 ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 08/18] tests: fix check-qobject leak Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 09/18] vl: fix direct firmware directories leak Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 10/18] readline: add a free function Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 11/18] tests: fix migration-test leak Marc-André Lureau
2018-01-04 17:28 ` Juan Quintela
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 12/18] crypto: fix stack-buffer-overflow error Marc-André Lureau
2018-01-04 16:40 ` Thomas Huth
2018-01-04 17:10 ` Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 13/18] qemu-config: fix leak in query-command-line-options Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 14/18] tests: fix qmp-test leak Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 15/18] ucontext: annotate coroutine stack for ASAN Marc-André Lureau
2018-01-09 11:09 ` Philippe Mathieu-Daudé
2018-01-09 11:10 ` Philippe Mathieu-Daudé
2018-01-09 11:23 ` Marc-André Lureau
2018-01-12 11:15 ` Marc-André Lureau
2018-01-12 11:21 ` Paolo Bonzini
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 16/18] tests: fix coroutine leak in /basic/entered Marc-André Lureau
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 17/18] mips: fix potential fopen(NULL,...) Marc-André Lureau
2018-01-04 16:27 ` [Qemu-devel] [PATCH v3 17/18] mips: fix potential fopen(NULL, ...) Philippe Mathieu-Daudé
2018-01-04 16:05 ` [Qemu-devel] [PATCH v3 18/18] disas/s390: fix global-buffer-overflow Marc-André Lureau
2018-01-04 17:02 ` [Qemu-devel] [PATCH v3 00/18] Various build-sys and sanitizer related fixes no-reply
2018-01-05 10:20 ` Paolo Bonzini
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=20180104160523.22995-4-marcandre.lureau@redhat.com \
--to=marcandre.lureau@redhat.com \
--cc=berrange@redhat.com \
--cc=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@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).