qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 06/15] configure: remove boolean variables for targets


From: Thomas Huth
Subject: Re: [PATCH 06/15] configure: remove boolean variables for targets
Date: Mon, 4 Sep 2023 10:15:24 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

On 02/09/2023 14.59, Paolo Bonzini wrote:
Just use $targetos always.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
  configure | 55 +++++++++++++------------------------------------------
  1 file changed, 13 insertions(+), 42 deletions(-)
...
@@ -1718,7 +1687,7 @@ echo all: >> $config_host_mak
  if test "$debug_tcg" = "yes" ; then
    echo "CONFIG_DEBUG_TCG=y" >> $config_host_mak
  fi
-if test "$mingw32" = "yes" ; then
+if test "$targetos" = "windows"; then
    echo "CONFIG_WIN32=y" >> $config_host_mak
    echo "QEMU_GA_MANUFACTURER=${QEMU_GA_MANUFACTURER-QEMU}" >> $config_host_mak
    echo "QEMU_GA_DISTRO=${QEMU_GA_DISTRO-Linux}" >> $config_host_mak
@@ -1727,24 +1696,26 @@ else
    echo "CONFIG_POSIX=y" >> $config_host_mak
  fi
-if test "$linux" = "yes" ; then
+if test "$targetos" = "linux" ; then
    echo "CONFIG_LINUX=y" >> $config_host_mak
  fi
-if test "$darwin" = "yes" ; then
+if test "$targetos" = "darwin" ; then
    echo "CONFIG_DARWIN=y" >> $config_host_mak
  fi
-if test "$solaris" = "yes" ; then
+if test "$targetos" = "sunos" ; then
    echo "CONFIG_SOLARIS=y" >> $config_host_mak
  fi
  echo "SRC_PATH=$source_path" >> $config_host_mak
  echo "TARGET_DIRS=$target_list" >> $config_host_mak
# XXX: suppress that
-if [ "$bsd" = "yes" ] ; then
-  echo "CONFIG_BSD=y" >> $config_host_mak
-fi
+case $targetos in
+  gnu/kfreebsd | freebsd | dragonfly | netbsd | openbsd | darwin)
+    echo "CONFIG_BSD=y" >> $config_host_mak
+    ;;
+esac

It might look nicer to put the linux and solaris parts from above as separate entries in the new case-esac statement.

Anyway:
Reviewed-by: Thomas Huth <thuth@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]