Patchwork [01/14] configure: rename $datadir to $qemu_datadir

login
register
mail settings
Submitter Eduardo Habkost
Date April 18, 2012, 7:55 p.m.
Message ID <1334778950-18660-2-git-send-email-ehabkost@redhat.com>
Download mbox | patch
Permalink /patch/153573/
State New
Headers show

Comments

Eduardo Habkost - April 18, 2012, 7:55 p.m.
The variable is used for the qemu-specific directory and has a different
meaning of the autoconf "datadir" variable (that's used for the
$prefix/share directory, not for $prefix/share/PACKAGE).

This doesn't change behavior or interfaces, it's just an internal
variable rename.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 configure |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
Eric Blake - April 18, 2012, 7:57 p.m.
On 04/18/2012 01:55 PM, Eduardo Habkost wrote:
> The variable is used for the qemu-specific directory and has a different
> meaning of the autoconf "datadir" variable (that's used for the
> $prefix/share directory, not for $prefix/share/PACKAGE).

Automake uses the name $pkgdatadir for $prefix/share/PACKAGE; is it
worth respinning this patch to s/qemu_datadir/pkgdatadir/ so that our
files have at least a bit more similarity to autotool'd packages?

> -datadir="\${prefix}/share/qemu"
> +qemu_datadir="\${prefix}/share/qemu"
Eduardo Habkost - April 18, 2012, 8:09 p.m.
On Wed, Apr 18, 2012 at 01:57:51PM -0600, Eric Blake wrote:
> On 04/18/2012 01:55 PM, Eduardo Habkost wrote:
> > The variable is used for the qemu-specific directory and has a different
> > meaning of the autoconf "datadir" variable (that's used for the
> > $prefix/share directory, not for $prefix/share/PACKAGE).
> 
> Automake uses the name $pkgdatadir for $prefix/share/PACKAGE; is it
> worth respinning this patch to s/qemu_datadir/pkgdatadir/ so that our
> files have at least a bit more similarity to autotool'd packages?

Personally, I think $qemu_datadir more clear than $pkgdatadir, as the
name makes it clear that it's a qemu-specific variable. (But maybe
people with more experience with Autotools would say it's the oppposite.
I can respin the series if others think it's worth it.)

> 
> > -datadir="\${prefix}/share/qemu"
> > +qemu_datadir="\${prefix}/share/qemu"
>

Patch

diff --git a/configure b/configure
index 2d62d12..c2b1c3b 100755
--- a/configure
+++ b/configure
@@ -155,7 +155,7 @@  mingw32="no"
 EXESUF=""
 prefix="/usr/local"
 mandir="\${prefix}/share/man"
-datadir="\${prefix}/share/qemu"
+qemu_datadir="\${prefix}/share/qemu"
 docdir="\${prefix}/share/doc/qemu"
 bindir="\${prefix}/bin"
 libdir="\${prefix}/lib"
@@ -521,7 +521,7 @@  EOF
   fi
   prefix="c:/Program Files/QEMU"
   mandir="\${prefix}"
-  datadir="\${prefix}"
+  qemu_datadir="\${prefix}"
   docdir="\${prefix}"
   bindir="\${prefix}"
   sysconfdir="\${prefix}"
@@ -589,7 +589,7 @@  for opt do
   ;;
   --includedir=*) includedir="$optarg"
   ;;
-  --datadir=*) datadir="$optarg"
+  --datadir=*) qemu_datadir="$optarg"
   ;;
   --docdir=*) docdir="$optarg"
   ;;
@@ -2889,7 +2889,7 @@  if test "$cpu" = "ppc64" -a "$targetos" != "Darwin" ; then
 fi
 
 echo "Install prefix    $prefix"
-echo "BIOS directory    `eval echo $datadir`"
+echo "BIOS directory    `eval echo $qemu_datadir`"
 echo "binary directory  `eval echo $bindir`"
 echo "library directory `eval echo $libdir`"
 echo "include directory `eval echo $includedir`"
@@ -2997,7 +2997,7 @@  echo "bindir=$bindir" >> $config_host_mak
 echo "libdir=$libdir" >> $config_host_mak
 echo "includedir=$includedir" >> $config_host_mak
 echo "mandir=$mandir" >> $config_host_mak
-echo "datadir=$datadir" >> $config_host_mak
+echo "datadir=$qemu_datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
 echo "docdir=$docdir" >> $config_host_mak
 echo "confdir=$confdir" >> $config_host_mak