From 1a28f878b50f55cd5965dfb61d1e5e8009a59197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Fri, 6 Mar 2020 18:04:56 +0100 Subject: build-sys: Move the print-variable rule to rules.mak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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é Reviewed-by: Marc-André Lureau Message-Id: <20200306170456.21977-1-philmd@redhat.com> Signed-off-by: Laurent Vivier --- rules.mak | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rules.mak') 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 '$*=$($*)' -- cgit v1.2.3