summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorMarc-André Lureau2018-01-04 17:05:08 +0100
committerPaolo Bonzini2018-01-12 13:22:02 +0100
commitde1da442ea38b7f4627072df0cd80f3537cf8390 (patch)
tree09f8c521a50264a339e54a3085085cc62748cb35 /Makefile
parentbuild-sys: silence make by default or V=0 (diff)
downloadqemu-de1da442ea38b7f4627072df0cd80f3537cf8390.tar.gz
qemu-de1da442ea38b7f4627072df0cd80f3537cf8390.tar.xz
qemu-de1da442ea38b7f4627072df0cd80f3537cf8390.zip
build-sys: add a rule to print a variable
$ 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> Message-Id: <20180104160523.22995-4-marcandre.lureau@redhat.com> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 4 insertions, 1 deletions
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.