qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup
@ 2010-05-26 14:08 Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 01/14] bail out early on invalid -cpu option Paolo Bonzini
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

This series cleans up the handling of --xyzdir options and
improves the customizability of the directory layout.

Patches 1/2/3/14 are somewhat unrelated to the main purpose
of the patch, but they conflict with other patches in the
series so I sent them together.

Paolo Bonzini (14):
  bail out early on invalid -cpu option
  avoid using expr in configure
  dyngen is long time gone
  delete duplicate create_config case stanza
  move all directory entries in config-host.mak close
  introduce sysconfsuffix
  introduce confdir and confsuffix
  rename CONFIG_QEMU_PREFIX
  expand ${prefix} in create_config
  unify handling of xyzdir variables
  introduce more --xyzdir options
  ignore unknown --xyzdir options
  move directory defaults earlier
  move computation of tools and roms outside of config-host.mak generation

 bsd-user/main.c   |    2 +-
 configure         |  138 +++++++++++++++++++++++++++--------------------------
 create_config     |   12 +++--
 linux-user/main.c |    2 +-
 vl.c              |    2 +-
 5 files changed, 82 insertions(+), 74 deletions(-)

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 01/14] bail out early on invalid -cpu option
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 02/14] avoid using expr in configure Paolo Bonzini
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

It would fail later anyway.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 3cd2c5f..e8dd2ef 100755
--- a/configure
+++ b/configure
@@ -232,7 +232,8 @@ case "$cpu" in
     cpu="sparc"
   ;;
   *)
-    cpu="unknown"
+    echo "Unsupported CPU = $cpu"
+    exit 1
   ;;
 esac
 
@@ -2068,10 +2069,6 @@ case "$cpu" in
   armv4b|armv4l)
     ARCH=arm
   ;;
-  *)
-    echo "Unsupported CPU = $cpu"
-    exit 1
-  ;;
 esac
 echo "ARCH=$ARCH" >> $config_host_mak
 if test "$debug_tcg" = "yes" ; then
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 02/14] avoid using expr in configure
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 01/14] bail out early on invalid -cpu option Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 03/14] dyngen is long time gone Paolo Bonzini
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Just a personal preference against duplicating hieroglyphics.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index e8dd2ef..5a7cb6e 100755
--- a/configure
+++ b/configure
@@ -928,6 +928,13 @@ if test -z "$target_list" ; then
     echo "No targets enabled"
     exit 1
 fi
+# see if system emulation was really requested
+case " $target_list " in
+  *"-softmmu "*) softmmu=yes
+  ;;
+  *) softmmu=no
+  ;;
+esac
 
 feature_not_found() {
   feature=$1
@@ -2282,7 +2289,7 @@ bsd)
 esac
 
 tools=
-if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
+if test "$softmmu" = yes ; then
   tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
       tools="qemu-nbd\$(EXESUF) $tools"
@@ -2298,7 +2305,7 @@ echo "TOOLS=$tools" >> $config_host_mak
 roms=
 if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
         "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
-        `expr "$target_list" : ".*softmmu.*"` != 0 ; then
+        "$softmmu" = yes ; then
   roms="optionrom"
 fi
 echo "ROMS=$roms" >> $config_host_mak
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 03/14] dyngen is long time gone
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 01/14] bail out early on invalid -cpu option Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 02/14] avoid using expr in configure Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 04/14] delete duplicate create_config case stanza Paolo Bonzini
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 5a7cb6e..f96cccc 100755
--- a/configure
+++ b/configure
@@ -748,7 +748,8 @@ echo "Advanced options (experts only):"
 echo "  --source-path=PATH       path of source code [$source_path]"
 echo "  --cross-prefix=PREFIX    use PREFIX for compile tools [$cross_prefix]"
 echo "  --cc=CC                  use C compiler CC [$cc]"
-echo "  --host-cc=CC             use C compiler CC [$host_cc] for dyngen etc."
+echo "  --host-cc=CC             use C compiler CC [$host_cc] for code run at"
+echo "                           build time"
 echo "  --extra-cflags=CFLAGS    append extra C compiler flags QEMU_CFLAGS"
 echo "  --extra-ldflags=LDFLAGS  append extra linker flags LDFLAGS"
 echo "  --make=MAKE              use specified make [$make]"
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 04/14] delete duplicate create_config case stanza
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (2 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 03/14] dyngen is long time gone Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 05/14] introduce sysconfsuffix Paolo Bonzini
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 create_config |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/create_config b/create_config
index 2f052ae..edcad25 100755
--- a/create_config
+++ b/create_config
@@ -13,11 +13,6 @@ case $line in
     pkgversion=${line#*=}
     echo "#define QEMU_PKGVERSION \"$pkgversion\""
     ;;
- ARCH=*) # configuration
-    arch=${line#*=}
-    arch_name=`echo $arch | tr '[:lower:]' '[:upper:]'`
-    echo "#define HOST_$arch_name 1"
-    ;;
  CONFIG_AUDIO_DRIVERS=*)
     drivers=${line#*=}
     echo "#define CONFIG_AUDIO_DRIVERS \\"
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 05/14] introduce sysconfsuffix
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (3 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 04/14] delete duplicate create_config case stanza Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 06/14] introduce confdir and confsuffix Paolo Bonzini
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index f96cccc..cf19ebf 100755
--- a/configure
+++ b/configure
@@ -1972,9 +1972,7 @@ if test "$mingw32" = "yes" ; then
   confsuffix=""
   docsuffix=""
   binsuffix=""
-  if test -z "$sysconfdir" ; then
-      sysconfdir="${prefix}"
-  fi
+  sysconfsuffix=""
 else
   if test -z "$prefix" ; then
       prefix="/usr/local"
@@ -1983,11 +1981,11 @@ else
   datasuffix="/share/qemu"
   docsuffix="/share/doc/qemu"
   binsuffix="/bin"
-  if test -z "$sysconfdir" ; then
-      sysconfdir="${prefix}/etc"
-  fi
+  sysconfsuffix="/etc"
 fi
 
+: ${sysconfdir:="${prefix}$sysconfsuffix"}
+
 echo "Install prefix    $prefix"
 echo "BIOS directory    $prefix$datasuffix"
 echo "binary directory  $prefix$binsuffix"
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 06/14] introduce confdir and confsuffix
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (4 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 05/14] introduce sysconfsuffix Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 07/14] rename CONFIG_QEMU_PREFIX Paolo Bonzini
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

confsuffix was write-only, flesh it out.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/configure b/configure
index cf19ebf..435e765 100755
--- a/configure
+++ b/configure
@@ -1969,10 +1969,10 @@ if test "$mingw32" = "yes" ; then
   fi
   mansuffix=""
   datasuffix=""
-  confsuffix=""
   docsuffix=""
   binsuffix=""
   sysconfsuffix=""
+  confsuffix=""
 else
   if test -z "$prefix" ; then
       prefix="/usr/local"
@@ -1982,9 +1982,11 @@ else
   docsuffix="/share/doc/qemu"
   binsuffix="/bin"
   sysconfsuffix="/etc"
+  confsuffix="/qemu"
 fi
 
 : ${sysconfdir:="${prefix}$sysconfsuffix"}
+confdir=$sysconfdir$confsuffix
 
 echo "Install prefix    $prefix"
 echo "BIOS directory    $prefix$datasuffix"
@@ -2062,11 +2064,7 @@ printf " '%s'" "$0" "$@" >> $config_host_mak
 echo >> $config_host_mak
 
 echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
-if test "$mingw32" = "yes" ; then
-  echo "CONFIG_QEMU_CONFDIR=\"$sysconfdir\"" >> $config_host_mak
-else
-  echo "CONFIG_QEMU_CONFDIR=\"${sysconfdir}/qemu\"" >> $config_host_mak
-fi
+echo "CONFIG_QEMU_CONFDIR=\"$confdir\"" >> $config_host_mak
 
 case "$cpu" in
   i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64)
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 07/14] rename CONFIG_QEMU_PREFIX
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (5 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 06/14] introduce confdir and confsuffix Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 08/14] unify handling of xyzdir variables Paolo Bonzini
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 bsd-user/main.c   |    2 +-
 configure         |    2 +-
 linux-user/main.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bsd-user/main.c b/bsd-user/main.c
index 05cc3d9..aff9f13 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -43,7 +43,7 @@ unsigned long guest_base;
 int have_guest_base;
 #endif
 
-static const char *interp_prefix = CONFIG_QEMU_PREFIX;
+static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
 const char *qemu_uname_release = CONFIG_UNAME_RELEASE;
 extern char **environ;
 enum BSDType bsd_type;
diff --git a/configure b/configure
index 435e765..c561132 100755
--- a/configure
+++ b/configure
@@ -2427,7 +2427,7 @@ echo "# Automatically generated by configure - do not modify" > $config_target_m
 bflt="no"
 target_nptl="no"
 interp_prefix1=`echo "$interp_prefix" | sed "s/%M/$target_arch2/g"`
-echo "CONFIG_QEMU_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
+echo "CONFIG_QEMU_INTERP_PREFIX=\"$interp_prefix1\"" >> $config_target_mak
 gdb_xml_files=""
 
 TARGET_ARCH="$target_arch2"
diff --git a/linux-user/main.c b/linux-user/main.c
index b240f29..456feb0 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -46,7 +46,7 @@ unsigned long guest_base;
 int have_guest_base;
 #endif
 
-static const char *interp_prefix = CONFIG_QEMU_PREFIX;
+static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
 const char *qemu_uname_release = CONFIG_UNAME_RELEASE;
 
 /* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 08/14] unify handling of xyzdir variables
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (6 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 07/14] rename CONFIG_QEMU_PREFIX Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 09/14] move all directory entries in config-host.mak close Paolo Bonzini
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Making an xyzdir variable for each directory prepares for the next
patches introducing config-host.h defines and configure options for them.
It also fixes the problem where overriding prefix at "make install"
time did not override it for sysconfdir.

Removes some of the differences between sysconfdir and other variables,
the rest will go away later.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/configure b/configure
index c561132..fee9665 100755
--- a/configure
+++ b/configure
@@ -1985,14 +1985,18 @@ else
   confsuffix="/qemu"
 fi
 
-: ${sysconfdir:="${prefix}$sysconfsuffix"}
+mandir="\${prefix}$mansuffix"
+datadir="\${prefix}$datasuffix"
+docdir="\${prefix}$docsuffix"
+bindir="\${prefix}$binsuffix"
+: ${sysconfdir:="\${prefix}$sysconfsuffix"}
 confdir=$sysconfdir$confsuffix
 
 echo "Install prefix    $prefix"
-echo "BIOS directory    $prefix$datasuffix"
-echo "binary directory  $prefix$binsuffix"
+echo "BIOS directory    `eval echo $datadir`"
+echo "binary directory  `eval echo $bindir`"
 if test "$mingw32" = "no" ; then
-echo "Manual directory  $prefix$mansuffix"
+echo "Manual directory  `eval echo $mandir`"
 echo "ELF interp prefix $interp_prefix"
 fi
 echo "Source path       $source_path"
@@ -2308,11 +2312,11 @@ fi
 echo "ROMS=$roms" >> $config_host_mak
 
 echo "prefix=$prefix" >> $config_host_mak
-echo "bindir=\${prefix}$binsuffix" >> $config_host_mak
-echo "mandir=\${prefix}$mansuffix" >> $config_host_mak
-echo "datadir=\${prefix}$datasuffix" >> $config_host_mak
+echo "bindir=$bindir" >> $config_host_mak
+echo "mandir=$mandir" >> $config_host_mak
+echo "datadir=$datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
-echo "docdir=\${prefix}$docsuffix" >> $config_host_mak
+echo "docdir=$docdir" >> $config_host_mak
 echo "MAKE=$make" >> $config_host_mak
 echo "INSTALL=$install" >> $config_host_mak
 echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_host_mak
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 09/14] move all directory entries in config-host.mak close
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (7 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 08/14] unify handling of xyzdir variables Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 10/14] expand ${prefix} in create_config Paolo Bonzini
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/configure b/configure
index fee9665..9736942 100755
--- a/configure
+++ b/configure
@@ -2067,6 +2067,12 @@ printf "# Configured with:" >> $config_host_mak
 printf " '%s'" "$0" "$@" >> $config_host_mak
 echo >> $config_host_mak
 
+echo "prefix=$prefix" >> $config_host_mak
+echo "bindir=$bindir" >> $config_host_mak
+echo "mandir=$mandir" >> $config_host_mak
+echo "datadir=$datadir" >> $config_host_mak
+echo "sysconfdir=$sysconfdir" >> $config_host_mak
+echo "docdir=$docdir" >> $config_host_mak
 echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
 echo "CONFIG_QEMU_CONFDIR=\"$confdir\"" >> $config_host_mak
 
@@ -2310,13 +2316,6 @@ if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
   roms="optionrom"
 fi
 echo "ROMS=$roms" >> $config_host_mak
-
-echo "prefix=$prefix" >> $config_host_mak
-echo "bindir=$bindir" >> $config_host_mak
-echo "mandir=$mandir" >> $config_host_mak
-echo "datadir=$datadir" >> $config_host_mak
-echo "sysconfdir=$sysconfdir" >> $config_host_mak
-echo "docdir=$docdir" >> $config_host_mak
 echo "MAKE=$make" >> $config_host_mak
 echo "INSTALL=$install" >> $config_host_mak
 echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_host_mak
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 10/14] expand ${prefix} in create_config
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (8 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 09/14] move all directory entries in config-host.mak close Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 11/14] introduce more --xyzdir options Paolo Bonzini
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure     |    3 +--
 create_config |    9 +++++++++
 vl.c          |    2 +-
 3 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 9736942..4dc75c2 100755
--- a/configure
+++ b/configure
@@ -2073,8 +2073,7 @@ echo "mandir=$mandir" >> $config_host_mak
 echo "datadir=$datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
 echo "docdir=$docdir" >> $config_host_mak
-echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
-echo "CONFIG_QEMU_CONFDIR=\"$confdir\"" >> $config_host_mak
+echo "confdir=$confdir" >> $config_host_mak
 
 case "$cpu" in
   i386|x86_64|alpha|cris|hppa|ia64|m68k|microblaze|mips|mips64|ppc|ppc64|s390|s390x|sparc|sparc64)
diff --git a/create_config b/create_config
index edcad25..23c0cd5 100755
--- a/create_config
+++ b/create_config
@@ -13,6 +13,15 @@ case $line in
     pkgversion=${line#*=}
     echo "#define QEMU_PKGVERSION \"$pkgversion\""
     ;;
+ prefix=* | *dir=*) # directory configuration
+    name=${line%=*}
+    value=${line#*=}
+    define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
+    eval "define_value=\"$value\""
+    echo "#define CONFIG_QEMU_$define_name \"$define_value\""
+    # save for the next definitions
+    eval "$name=\$define_value"
+    ;;
  CONFIG_AUDIO_DRIVERS=*)
     drivers=${line#*=}
     echo "#define CONFIG_AUDIO_DRIVERS \\"
diff --git a/vl.c b/vl.c
index 328395e..18bddde 100644
--- a/vl.c
+++ b/vl.c
@@ -3420,7 +3420,7 @@ int main(int argc, char **argv, char **envp)
     }
     /* If all else fails use the install patch specified when building.  */
     if (!data_dir) {
-        data_dir = CONFIG_QEMU_SHAREDIR;
+        data_dir = CONFIG_QEMU_DATADIR;
     }
 
     /*
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 11/14] introduce more --xyzdir options
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (9 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 10/14] expand ${prefix} in create_config Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 12/14] ignore unknown " Paolo Bonzini
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/configure b/configure
index 4dc75c2..2e59f9b 100755
--- a/configure
+++ b/configure
@@ -68,6 +68,10 @@ cpu=""
 prefix=""
 interp_prefix="/usr/gnemul/qemu-%M"
 static="no"
+mandir=""
+datadir=""
+docdir=""
+bindir=""
 sysconfdir=""
 sparc_cpu=""
 cross_prefix=""
@@ -501,6 +505,14 @@ for opt do
     static="yes"
     LDFLAGS="-static $LDFLAGS"
   ;;
+  --mandir=*) mandir="$optarg"
+  ;;
+  --bindir=*) bindir="$optarg"
+  ;;
+  --datadir=*) datadir="$optarg"
+  ;;
+  --docdir=*) docdir="$optarg"
+  ;;
   --sysconfdir=*) sysconfdir="$optarg"
   ;;
   --disable-sdl) sdl="no"
@@ -755,7 +767,11 @@ echo "  --extra-ldflags=LDFLAGS  append extra linker flags LDFLAGS"
 echo "  --make=MAKE              use specified make [$make]"
 echo "  --install=INSTALL        use specified install [$install]"
 echo "  --static                 enable static build [$static]"
-echo "  --sysconfdir=PATH        install config in PATH"
+echo "  --mandir=PATH            install man pages in PATH"
+echo "  --datadir=PATH           install firmware in PATH"
+echo "  --docdir=PATH            install documentation in PATH"
+echo "  --bindir=PATH            install binaries in PATH"
+echo "  --sysconfdir=PATH        install config in PATH/qemu"
 echo "  --enable-debug-tcg       enable TCG debugging"
 echo "  --disable-debug-tcg      disable TCG debugging (default)"
 echo "  --enable-debug           enable common debug build options"
@@ -1985,10 +2001,10 @@ else
   confsuffix="/qemu"
 fi
 
-mandir="\${prefix}$mansuffix"
-datadir="\${prefix}$datasuffix"
-docdir="\${prefix}$docsuffix"
-bindir="\${prefix}$binsuffix"
+: ${mandir:="\${prefix}$mansuffix"}
+: ${datadir:="\${prefix}$datasuffix"}
+: ${docdir:="\${prefix}$docsuffix"}
+: ${bindir:="\${prefix}$binsuffix"}
 : ${sysconfdir:="\${prefix}$sysconfsuffix"}
 confdir=$sysconfdir$confsuffix
 
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 12/14] ignore unknown --xyzdir options
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (10 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 11/14] introduce more --xyzdir options Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 13/14] move directory defaults earlier Paolo Bonzini
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/configure b/configure
index 2e59f9b..b036c40 100755
--- a/configure
+++ b/configure
@@ -673,6 +673,8 @@ for opt do
   ;;
   --enable-vhost-net) vhost_net="yes"
   ;;
+  --*dir)
+  ;;
   *) echo "ERROR: unknown option $opt"; show_help="yes"
   ;;
   esac
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 13/14] move directory defaults earlier
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (11 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 12/14] ignore unknown " Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 14/14] move computation of tools and roms outside of config-host.mak generation Paolo Bonzini
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Unify with existing special-purpose configure code for win32.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |   47 ++++++++++++++---------------------------------
 1 files changed, 14 insertions(+), 33 deletions(-)

diff --git a/configure b/configure
index b036c40..488ef07 100755
--- a/configure
+++ b/configure
@@ -65,14 +65,8 @@ path_of() {
 
 # default parameters
 cpu=""
-prefix=""
 interp_prefix="/usr/gnemul/qemu-%M"
 static="no"
-mandir=""
-datadir=""
-docdir=""
-bindir=""
-sysconfdir=""
 sparc_cpu=""
 cross_prefix=""
 cc="gcc"
@@ -280,6 +274,13 @@ strip_opt="yes"
 bigendian="no"
 mingw32="no"
 EXESUF=""
+prefix="/usr/local"
+mandir="\${prefix}/share/man"
+datadir="\${prefix}/share/qemu"
+docdir="\${prefix}/share/doc/qemu"
+bindir="\${prefix}/bin"
+sysconfdir="\${prefix}/etc"
+confsuffix="/qemu"
 slirp="yes"
 fmod_lib=""
 fmod_inc=""
@@ -454,6 +455,13 @@ if test "$mingw32" = "yes" ; then
   # enable C99/POSIX format strings (needs mingw32-runtime 3.15 or later)
   QEMU_CFLAGS="-D__USE_MINGW_ANSI_STDIO=1 $QEMU_CFLAGS"
   LIBS="-lwinmm -lws2_32 -liphlpapi $LIBS"
+  prefix="c:/Program Files/Qemu"
+  mandir="\${prefix}"
+  datadir="\${prefix}"
+  docdir="\${prefix}"
+  bindir="\${prefix}"
+  sysconfdir="\${prefix}"
+  confsuffix=""
 fi
 
 # find source path
@@ -1981,33 +1989,6 @@ if test "$solaris" = "no" ; then
     fi
 fi
 
-if test "$mingw32" = "yes" ; then
-  if test -z "$prefix" ; then
-      prefix="c:/Program Files/Qemu"
-  fi
-  mansuffix=""
-  datasuffix=""
-  docsuffix=""
-  binsuffix=""
-  sysconfsuffix=""
-  confsuffix=""
-else
-  if test -z "$prefix" ; then
-      prefix="/usr/local"
-  fi
-  mansuffix="/share/man"
-  datasuffix="/share/qemu"
-  docsuffix="/share/doc/qemu"
-  binsuffix="/bin"
-  sysconfsuffix="/etc"
-  confsuffix="/qemu"
-fi
-
-: ${mandir:="\${prefix}$mansuffix"}
-: ${datadir:="\${prefix}$datasuffix"}
-: ${docdir:="\${prefix}$docsuffix"}
-: ${bindir:="\${prefix}$binsuffix"}
-: ${sysconfdir:="\${prefix}$sysconfsuffix"}
 confdir=$sysconfdir$confsuffix
 
 echo "Install prefix    $prefix"
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Qemu-devel] [PATCH 14/14] move computation of tools and roms outside of config-host.mak generation
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (12 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 13/14] move directory defaults earlier Paolo Bonzini
@ 2010-05-26 14:08 ` Paolo Bonzini
  2010-05-26 18:08 ` [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Richard Henderson
  2010-06-09 22:15 ` Aurelien Jarno
  15 siblings, 0 replies; 17+ messages in thread
From: Paolo Bonzini @ 2010-05-26 14:08 UTC (permalink / raw)
  To: qemu-devel

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure |   40 +++++++++++++++++++++-------------------
 1 files changed, 21 insertions(+), 19 deletions(-)

diff --git a/configure b/configure
index 488ef07..d9983b0 100755
--- a/configure
+++ b/configure
@@ -1991,6 +1991,27 @@ fi
 
 confdir=$sysconfdir$confsuffix
 
+tools=
+if test "$softmmu" = yes ; then
+  tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
+  if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
+      tools="qemu-nbd\$(EXESUF) $tools"
+    if [ "$check_utests" = "yes" ]; then
+      tools="check-qint check-qstring check-qdict check-qlist $tools"
+      tools="check-qfloat check-qjson $tools"
+    fi
+  fi
+fi
+
+# Mac OS X ships with a broken assembler
+roms=
+if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
+        "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
+        "$softmmu" = yes ; then
+  roms="optionrom"
+fi
+
+
 echo "Install prefix    $prefix"
 echo "BIOS directory    `eval echo $datadir`"
 echo "binary directory  `eval echo $bindir`"
@@ -2293,26 +2314,7 @@ bsd)
 ;;
 esac
 
-tools=
-if test "$softmmu" = yes ; then
-  tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
-  if [ "$linux" = "yes" -o "$bsd" = "yes" -o "$solaris" = "yes" ] ; then
-      tools="qemu-nbd\$(EXESUF) $tools"
-    if [ "$check_utests" = "yes" ]; then
-      tools="check-qint check-qstring check-qdict check-qlist $tools"
-      tools="check-qfloat check-qjson $tools"
-    fi
-  fi
-fi
 echo "TOOLS=$tools" >> $config_host_mak
-
-# Mac OS X ships with a broken assembler
-roms=
-if test \( "$cpu" = "i386" -o "$cpu" = "x86_64" \) -a \
-        "$targetos" != "Darwin" -a "$targetos" != "SunOS" -a \
-        "$softmmu" = yes ; then
-  roms="optionrom"
-fi
 echo "ROMS=$roms" >> $config_host_mak
 echo "MAKE=$make" >> $config_host_mak
 echo "INSTALL=$install" >> $config_host_mak
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (13 preceding siblings ...)
  2010-05-26 14:08 ` [Qemu-devel] [PATCH 14/14] move computation of tools and roms outside of config-host.mak generation Paolo Bonzini
@ 2010-05-26 18:08 ` Richard Henderson
  2010-06-09 22:15 ` Aurelien Jarno
  15 siblings, 0 replies; 17+ messages in thread
From: Richard Henderson @ 2010-05-26 18:08 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On 05/26/2010 07:08 AM, Paolo Bonzini wrote:
> This series cleans up the handling of --xyzdir options and
> improves the customizability of the directory layout.
> 
> Patches 1/2/3/14 are somewhat unrelated to the main purpose
> of the patch, but they conflict with other patches in the
> series so I sent them together.
> 
> Paolo Bonzini (14):
>   bail out early on invalid -cpu option
>   avoid using expr in configure
>   dyngen is long time gone
>   delete duplicate create_config case stanza
>   move all directory entries in config-host.mak close
>   introduce sysconfsuffix
>   introduce confdir and confsuffix
>   rename CONFIG_QEMU_PREFIX
>   expand ${prefix} in create_config
>   unify handling of xyzdir variables
>   introduce more --xyzdir options
>   ignore unknown --xyzdir options
>   move directory defaults earlier
>   move computation of tools and roms outside of config-host.mak generation
> 
>  bsd-user/main.c   |    2 +-
>  configure         |  138 +++++++++++++++++++++++++++--------------------------
>  create_config     |   12 +++--
>  linux-user/main.c |    2 +-
>  vl.c              |    2 +-
>  5 files changed, 82 insertions(+), 74 deletions(-)

Acked-By: Richard Henderson <rth@redhat.com>


r~

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup
  2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
                   ` (14 preceding siblings ...)
  2010-05-26 18:08 ` [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Richard Henderson
@ 2010-06-09 22:15 ` Aurelien Jarno
  15 siblings, 0 replies; 17+ messages in thread
From: Aurelien Jarno @ 2010-06-09 22:15 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Wed, May 26, 2010 at 04:08:15PM +0200, Paolo Bonzini wrote:
> This series cleans up the handling of --xyzdir options and
> improves the customizability of the directory layout.
> 
> Patches 1/2/3/14 are somewhat unrelated to the main purpose
> of the patch, but they conflict with other patches in the
> series so I sent them together.
> 
> Paolo Bonzini (14):
>   bail out early on invalid -cpu option
>   avoid using expr in configure
>   dyngen is long time gone
>   delete duplicate create_config case stanza
>   move all directory entries in config-host.mak close
>   introduce sysconfsuffix
>   introduce confdir and confsuffix
>   rename CONFIG_QEMU_PREFIX
>   expand ${prefix} in create_config
>   unify handling of xyzdir variables
>   introduce more --xyzdir options
>   ignore unknown --xyzdir options
>   move directory defaults earlier
>   move computation of tools and roms outside of config-host.mak generation
> 
>  bsd-user/main.c   |    2 +-
>  configure         |  138 +++++++++++++++++++++++++++--------------------------
>  create_config     |   12 +++--
>  linux-user/main.c |    2 +-
>  vl.c              |    2 +-
>  5 files changed, 82 insertions(+), 74 deletions(-)
> 

Thanks, all applied.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-06-09 22:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-26 14:08 [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 01/14] bail out early on invalid -cpu option Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 02/14] avoid using expr in configure Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 03/14] dyngen is long time gone Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 04/14] delete duplicate create_config case stanza Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 05/14] introduce sysconfsuffix Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 06/14] introduce confdir and confsuffix Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 07/14] rename CONFIG_QEMU_PREFIX Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 08/14] unify handling of xyzdir variables Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 09/14] move all directory entries in config-host.mak close Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 10/14] expand ${prefix} in create_config Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 11/14] introduce more --xyzdir options Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 12/14] ignore unknown " Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 13/14] move directory defaults earlier Paolo Bonzini
2010-05-26 14:08 ` [Qemu-devel] [PATCH 14/14] move computation of tools and roms outside of config-host.mak generation Paolo Bonzini
2010-05-26 18:08 ` [Qemu-devel] [PATCH 00/14] configure --xyzdir options cleanup Richard Henderson
2010-06-09 22:15 ` Aurelien Jarno

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).