OSDN Git Service

tests/tcg: reinstate or replace desired parts of rules.mak
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 21 Sep 2020 14:34:47 +0000 (10:34 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 30 Sep 2020 17:11:36 +0000 (19:11 +0200)
Commit 660f79309303d696531ffb394719dfab3e0c42c0 was a bit overzealous
with respect to tests/tcg, which needed quiet-command and $(BUILD_DIR).
Reinstate quiet-command, and replace $(BUILD_DIR) with just the
current directory.

Reported-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/tcg/Makefile.qemu
tests/tcg/configure.sh

index 0332bad..c096c61 100644 (file)
 # The configure script fills in extra information about
 # useful docker images or alternative compiler flags.
 
+# Usage: $(call quiet-command,command and args,"NAME","args to print")
+# This will run "command and args", and either:
+#  if V=1 just print the whole command and args
+#  otherwise print the 'quiet' output in the format "  NAME     args to print"
+# NAME should be a short name of the command, 7 letters or fewer.
+# If called with only a single argument, will print nothing in quiet mode.
+quiet-command-run = $(if $(V),,$(if $2,printf "  %-7s %s\n" $2 $3 && ))$1
+quiet-@ = $(if $(V),,@)
+quiet-command = $(quiet-@)$(call quiet-command-run,$1,$2,$3)
+
 CROSS_CC_GUEST:=
 DOCKER_IMAGE:=
--include $(BUILD_DIR)/tests/tcg/config-$(TARGET).mak
+
+-include tests/tcg/config-$(TARGET).mak
 
 GUEST_BUILD=
 TCG_MAKE=../Makefile.target
index 598a50c..be51bdb 100755 (executable)
@@ -193,11 +193,11 @@ for target in $target_list; do
   case $target in
     *-linux-user | *-bsd-user)
       echo "CONFIG_USER_ONLY=y" >> $config_target_mak
-      echo "QEMU=\$(BUILD_DIR)/qemu-$arch" >> $config_target_mak
+      echo "QEMU=$PWD/qemu-$arch" >> $config_target_mak
       ;;
     *-softmmu)
       echo "CONFIG_SOFTMMU=y" >> $config_target_mak
-      echo "QEMU=\$(BUILD_DIR)/qemu-system-$arch" >> $config_target_mak
+      echo "QEMU=$PWD/qemu-system-$arch" >> $config_target_mak
       ;;
   esac