Skip to contentSkip to conversation

configure: --with-confsuffix option

PATCH New Eduardo Habkost 1 participant 15 messages Apr 4, 2012 Kbuild

lore
Share & tools
lore
#13 lore raw

PATCH v4 13/14 configure: change meaning of --datadir to Autoconf convention

In reply to Eduardo Habkost

Autoconf uses --datadir for the /usr/share directory, not the program-specific subdirectory inside /usr/share. This changes configure to match autoconf behavior.

Note that this will break compatibility with existing build scripts.

---
 configure |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
configure +5 -4
index 37f455c..521d233 100755
@@ -155,7 +155,7 @@ mingw32="no"
 EXESUF=""
 prefix="/usr/local"
 mandir="\${prefix}/share/man"
-qemu_datadir="\${prefix}/share/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}"
-  qemu_datadir="\${prefix}"
+  datadir="\${prefix}"
   qemu_docdir="\${prefix}"
   bindir="\${prefix}"
   sysconfdir="\${prefix}"
@@ -589,7 +589,7 @@ for opt do
   ;;
   --includedir=*) includedir="$optarg"
   ;;
-  --datadir=*) qemu_datadir="$optarg"
+  --datadir=*) datadir="$optarg"
   ;;
   --docdir=*) qemu_docdir="$optarg"
   ;;
@@ -1007,7 +1007,7 @@ echo "  --python=PYTHON          use specified python [$python]"
 echo "  --smbd=SMBD              use specified smbd [$smbd]"
 echo "  --static                 enable static build [$static]"
 echo "  --mandir=PATH            install man pages in PATH"
-echo "  --datadir=PATH           install firmware in PATH"
+echo "  --datadir=PATH           install firmware in PATH/qemu"
 echo "  --docdir=PATH            install documentation in PATH"
 echo "  --bindir=PATH            install binaries in PATH"
 echo "  --sysconfdir=PATH        install config in PATH/qemu"
@@ -2838,6 +2838,7 @@ if test "$mingw32" = "yes" ; then
 fi
 
 qemu_confdir=$sysconfdir$confsuffix
+qemu_datadir=$datadir$confsuffix
 
 tools=
 if test "$softmmu" = yes ; then
Signature · 1 line
1.7.3.2
#1 lore raw

PATCH v4 1/14 configure: rename $datadir to $qemu_datadir

In reply to Eduardo Habkost

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.

---
 configure |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
configure +5 -5
index 4b3adc9..97c856a 100755
@@ -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"
   ;;
@@ -2872,7 +2872,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`"
@@ -2980,7 +2980,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
Signature · 1 line
1.7.3.2
#0 lore raw

v4 cover configure: --with-confsuffix option

I was going to resend only patch 14/14 with a fixed description, but then I noticed the series had to be rebased, with small conflicts on patches 04/14 and 12/14, so I am submitting the whole series again.

Changes v3 -> v4:
- Rebase against latest qemu.git
- Changed patch 14/14 subject to match the code (--with-confsuffix instead of --confsuffix)

Changes v2 -> v3:
- Changes --datadir meaning to match Autoconf convention (meaning that it should point to /usr/share, not /usr/share/qemu).
NOTE: this breaks compatibility.
I don't know of anybody who uses that option today. Neither Fedora, Debian, Arch Linux, Gentoo, or FreeBSD use it[1].
- Add --with-confsuffix option, to allow the /etc/qemu and /usr/share/qemu directories to have a different names.

[1] http://article.gmane.org/gmane.comp.emulators.qemu/142924

Series description:

Most of the patches are variable renames and cleanups. The actual changes are only on the last 2 patches.

First, internal configure variables are renamed, without changing config-host.mak:

configure: rename $datadir to $qemu_datadir
configure: rename $docdir to $qemu_docdir
configure: rename $confdir to $qemu_confdir

Then create_config gets ready for config-host.mak variable renames (Qemu-specific directories will now have a "qemu_" prefix):

create_config: separate section for qemu_*dir variables (v2)

Then, variables are renamed on config-host.mak and Makefiles:

  config-host.mak: rename datadir to qemu_datadir
  config-host.mak: rename confdir to qemu_confdir
  Makefile: use $(qemu_confdir) instead of $(sysconfdir)/qemu
  config-host.mak: rename docdir to qemu_docdir
  config-host.mak: remove CONFIG_QEMU_SHAREDIR
  config-host.mak: reorder variables a bit

Then old code on create_config is removed:

create_config: remove *dir block
create_config: simplify prefix=* block, remove CONFIG_QEMU_PREFIX

Finally, the user-visible changes:

configure: change meaning of --datadir to Autoconf convention
configure: add --with-confsuffix option

Eduardo Habkost (14):
configure: rename $datadir to $qemu_datadir
configure: rename $docdir to $qemu_docdir
configure: rename $confdir to $qemu_confdir
create_config: separate section for qemu_*dir variables (v2) config-host.mak: rename datadir to qemu_datadir config-host.mak: rename confdir to qemu_confdir
Makefile: use $(qemu_confdir) instead of $(sysconfdir)/qemu config-host.mak: rename docdir to qemu_docdir config-host.mak: remove CONFIG_QEMU_SHAREDIR config-host.mak: reorder variables a bit
create_config: remove *dir block
create_config: simplify prefix=* block, remove CONFIG_QEMU_PREFIX
configure: change meaning of --datadir to Autoconf convention
configure: add --with-confsuffix option

 Makefile              |   16 ++++++++--------
 Makefile.target       |    4 ++--
 configure             |   29 ++++++++++++++++-------------
 scripts/create_config |    8 ++++++--
 4 files changed, 32 insertions(+), 25 deletions(-)
Signature · 1 line
1.7.3.2
#12 lore raw

PATCH v4 12/14 create_config: simplify prefix=* block, remove CONFIG_QEMU_PREFIX

As now that block handles only the prefix variable, the code can be much simpler. This also removes the CONFIG_QEMU_PREFIX define as it is not used by any C code.

---
 scripts/create_config |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
scripts/create_config +1 -6
index 1d06eb1..c471e8c 100755
@@ -23,13 +23,8 @@ case $line in
     eval "$name=\$define_value"
     ;;
  prefix=*)
-    name=${line%=*}
-    value=${line#*=}
-    define_name=`echo $name | LC_ALL=C tr '[a-z]' '[A-Z]'`
-    eval "define_value=\"$value\""
-    echo "#define CONFIG_QEMU_$define_name \"$define_value\""
     # save for the next definitions
-    eval "$name=\$define_value"
+    prefix=${line#*=}
     ;;
  CONFIG_AUDIO_DRIVERS=*)
     drivers=${line#*=}
Signature · 1 line
1.7.3.2
#8 lore raw

PATCH v4 8/14 config-host.mak: rename docdir to qemu_docdir

In reply to Eduardo Habkost
---
 Makefile  |    4 ++--
 configure |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
Makefile +2 -2
index 795f9c4..f919fea 100644
@@ -267,8 +267,8 @@ BLOBS=
 endif
 
 install-doc: $(DOCS)
-	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
-	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(docdir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(qemu_docdir)"
+	$(INSTALL_DATA) qemu-doc.html  qemu-tech.html "$(DESTDIR)$(qemu_docdir)"
 ifdef CONFIG_POSIX
 	$(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
 	$(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
configure +1 -1
index 7009030..f15b714 100755
@@ -2982,7 +2982,7 @@ echo "includedir=$includedir" >> $config_host_mak
 echo "mandir=$mandir" >> $config_host_mak
 echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
-echo "docdir=$qemu_docdir" >> $config_host_mak
+echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
 echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
 echo "libexecdir=\${prefix}/libexec" >> $config_host_mak
 echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
Signature · 1 line
1.7.3.2
#6 lore raw

PATCH v4 6/14 config-host.mak: rename confdir to qemu_confdir

In reply to Eduardo Habkost

$confdir is a confusing name, as it's not clear if it's "the system config dir" or "the Qemus-specific directory inside the config dir". $qemu_confdir makes it more clear.

The current C code that uses CONFIG_QEMU_CONFDIR should be safe, as now create_config generates the same #define name (CONFIG_QEMU_CONFDIR) for both "confdir" and "qemu_confdir" variables.

---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
configure +1 -1
index 76144aa..7009030 100755
@@ -2983,7 +2983,7 @@ echo "mandir=$mandir" >> $config_host_mak
 echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
 echo "docdir=$qemu_docdir" >> $config_host_mak
-echo "confdir=$qemu_confdir" >> $config_host_mak
+echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
 echo "libexecdir=\${prefix}/libexec" >> $config_host_mak
 echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
 echo "CONFIG_QEMU_HELPERDIR=\"$prefix/libexec\"" >> $config_host_mak
Signature · 1 line
1.7.3.2
#7 lore raw

PATCH v4 7/14 Makefile: use $(qemu_confdir) instead of $(sysconfdir)/qemu

In reply to Eduardo Habkost

Instead of hardcoding the directory suffix, use the qemu-specific directory variable.

---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index 1c9abec..795f9c4 100644
@@ -280,8 +280,8 @@ ifdef CONFIG_VIRTFS
 	$(INSTALL_DATA) fsdev/virtfs-proxy-helper.1 "$(DESTDIR)$(mandir)/man1"
 endif
 install-sysconfig:
-	$(INSTALL_DIR) "$(DESTDIR)$(sysconfdir)/qemu"
-	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(sysconfdir)/qemu"
+	$(INSTALL_DIR) "$(DESTDIR)$(qemu_confdir)"
+	$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
 
 install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig
 	$(INSTALL_DIR) "$(DESTDIR)$(bindir)"
Signature · 1 line
1.7.3.2
#11 lore raw

PATCH v4 11/14 create_config: remove *dir block

In reply to Eduardo Habkost

Now only the qemu_*dir variables will become #defines. The other directory names aren't used by the C code.

That means the following #defines won't be available in C code anymore:

- CONFIG_QEMU_BINDIR
- CONFIG_QEMU_LIBDIR
- CONFIG_QEMU_INCLUDEDIR
- CONFIG_QEMU_MANDIR
- CONFIG_QEMU_SYSCONFDIR
- CONFIG_QEMU_LIBEXECDIR

The following #defines are going to be kept because they are handled by the qemu_* block on create_config:

- CONFIG_QEMU_CONFDIR
- CONFIG_QEMU_DATADIR
- CONFIG_QEMU_DOCDIR

This one will be kept because it is set directly by ./configure:

- CONFIG_QEMU_HELPERDIR

This patch keeps the 'prefix=*' (CONFIG_QEMU_PREFIX) pattern because other variables may use $prefix on their config-host.mak definitions. The remaining code will be simplified on a further patch.

---
 scripts/create_config |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/create_config +1 -1
index f9ba2f5..1d06eb1 100755
@@ -22,7 +22,7 @@ case $line in
     # save for the next definitions
     eval "$name=\$define_value"
     ;;
- prefix=* | [a-z]*dir=*) # directory configuration
+ prefix=*)
     name=${line%=*}
     value=${line#*=}
     define_name=`echo $name | LC_ALL=C tr '[a-z]' '[A-Z]'`
Signature · 1 line
1.7.3.2
#14 lore raw

PATCH v4 14/14 configure: add --with-confsuffix option

In reply to Eduardo Habkost

This will allow the user to make Qemu use a different subdirectory name inside $datadir and $sysconfdir, instead of "/qemu".

---
 configure |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
configure +6 -3
index 521d233..961c10e 100755
@@ -591,6 +591,8 @@ for opt do
   ;;
   --datadir=*) datadir="$optarg"
   ;;
+  --with-confsuffix=*) confsuffix="$optarg"
+  ;;
   --docdir=*) qemu_docdir="$optarg"
   ;;
   --sysconfdir=*) sysconfdir="$optarg"
@@ -1007,10 +1009,11 @@ echo "  --python=PYTHON          use specified python [$python]"
 echo "  --smbd=SMBD              use specified smbd [$smbd]"
 echo "  --static                 enable static build [$static]"
 echo "  --mandir=PATH            install man pages in PATH"
-echo "  --datadir=PATH           install firmware in PATH/qemu"
-echo "  --docdir=PATH            install documentation in PATH"
+echo "  --datadir=PATH           install firmware in PATH$confsuffix"
+echo "  --docdir=PATH            install documentation in PATH$confsuffix"
 echo "  --bindir=PATH            install binaries in PATH"
-echo "  --sysconfdir=PATH        install config in PATH/qemu"
+echo "  --sysconfdir=PATH        install config in PATH$confsuffix"
+echo "  --with-confsuffix=SUFFIX      suffix for Qemu data inside datadir and sysconfdir [$confsuffix]"
 echo "  --enable-debug-tcg       enable TCG debugging"
 echo "  --disable-debug-tcg      disable TCG debugging (default)"
 echo "  --enable-debug           enable common debug build options"
Signature · 1 line
1.7.3.2
#2 lore raw

PATCH v4 2/14 configure: rename $docdir to $qemu_docdir

In reply to Eduardo Habkost

The autoconf "docdir" variable is used for the program-specific subdirectory, but anyway it's better to make it clear that the variable is used for the qemu-specific subdirectory path.

---
 configure |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
configure +4 -4
index 97c856a..0cdc9ac 100755
@@ -156,7 +156,7 @@ EXESUF=""
 prefix="/usr/local"
 mandir="\${prefix}/share/man"
 qemu_datadir="\${prefix}/share/qemu"
-docdir="\${prefix}/share/doc/qemu"
+qemu_docdir="\${prefix}/share/doc/qemu"
 bindir="\${prefix}/bin"
 libdir="\${prefix}/lib"
 includedir="\${prefix}/include"
@@ -522,7 +522,7 @@ EOF
   prefix="c:/Program Files/Qemu"
   mandir="\${prefix}"
   qemu_datadir="\${prefix}"
-  docdir="\${prefix}"
+  qemu_docdir="\${prefix}"
   bindir="\${prefix}"
   sysconfdir="\${prefix}"
   confsuffix=""
@@ -591,7 +591,7 @@ for opt do
   ;;
   --datadir=*) qemu_datadir="$optarg"
   ;;
-  --docdir=*) docdir="$optarg"
+  --docdir=*) qemu_docdir="$optarg"
   ;;
   --sysconfdir=*) sysconfdir="$optarg"
   ;;
@@ -2982,7 +2982,7 @@ echo "includedir=$includedir" >> $config_host_mak
 echo "mandir=$mandir" >> $config_host_mak
 echo "datadir=$qemu_datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
-echo "docdir=$docdir" >> $config_host_mak
+echo "docdir=$qemu_docdir" >> $config_host_mak
 echo "confdir=$confdir" >> $config_host_mak
 echo "libexecdir=\${prefix}/libexec" >> $config_host_mak
 echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
Signature · 1 line
1.7.3.2
#5 lore raw

PATCH v4 5/14 config-host.mak: rename datadir to qemu_datadir

In reply to Eduardo Habkost

Autoconf concept of "datadir" is supposed to be "$prefix/share", not "$prefix/share/PACKAGE", so using datadir for the Qemu-specific directory is confusing.

The current C code that uses CONFIG_QEMU_DATADIR should be safe, as now create_config generates the same #define name (CONFIG_QEMU_DATADIR) for both "datadir" and "qemu_datadir" variables.

---
 Makefile        |    8 ++++----
 Makefile.target |    4 ++--
 configure       |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)
Makefile +4 -4
index 35c7a2a..1c9abec 100644
@@ -293,14 +293,14 @@ ifneq ($(HELPERS-y),)
 	$(INSTALL_PROG) $(STRIP_OPT) $(HELPERS-y) "$(DESTDIR)$(libexecdir)"
 endif
 ifneq ($(BLOBS),)
-	$(INSTALL_DIR) "$(DESTDIR)$(datadir)"
+	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)"
 	set -e; for x in $(BLOBS); do \
-		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
+		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
 	done
 endif
-	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
+	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/keymaps"
 	set -e; for x in $(KEYMAPS); do \
-		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
+		$(INSTALL_DATA) $(SRC_PATH)/pc-bios/keymaps/$$x "$(DESTDIR)$(qemu_datadir)/keymaps"; \
 	done
 	for d in $(TARGET_DIRS); do \
 	$(MAKE) -C $$d $@ || exit 1 ; \
Makefile.target +2 -2
index cff15f0..6d7d95c 100644
@@ -475,8 +475,8 @@ ifneq ($(STRIP),)
 endif
 endif
 ifdef CONFIG_TRACE_SYSTEMTAP
-	$(INSTALL_DIR) "$(DESTDIR)$(datadir)/../systemtap/tapset"
-	$(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(datadir)/../systemtap/tapset"
+	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
+	$(INSTALL_DATA) $(QEMU_PROG).stp "$(DESTDIR)$(qemu_datadir)/../systemtap/tapset"
 endif
 
 # Include automatically generated dependency files
configure +1 -1
index 95fa530..76144aa 100755
@@ -2980,7 +2980,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=$qemu_datadir" >> $config_host_mak
+echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
 echo "docdir=$qemu_docdir" >> $config_host_mak
 echo "confdir=$qemu_confdir" >> $config_host_mak
Signature · 1 line
1.7.3.2
#10 lore raw

PATCH v4 10/14 config-host.mak: reorder variables a bit

In reply to Eduardo Habkost

Cosmetic change.

---
 configure |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index eca08bb..37f455c 100755
@@ -2980,10 +2980,10 @@ 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 "qemu_datadir=$qemu_datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
-echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
 echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
+echo "qemu_datadir=$qemu_datadir" >> $config_host_mak
+echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
 echo "libexecdir=\${prefix}/libexec" >> $config_host_mak
 echo "CONFIG_QEMU_HELPERDIR=\"$prefix/libexec\"" >> $config_host_mak
 
Signature · 1 line
1.7.3.2
#4 lore raw

PATCH v4 4/14 create_config: separate section for qemu_*dir variables (v2)

In reply to Eduardo Habkost

The generic *dir section will eventually go away and be replaced with qemu_* section. By now, both sections will be kept, while the variables get renamed on config-host.mak.

With this patch, a XXXdir variable will become a CONFIG_QEMU_XXXDIR define, and a qemu_XXXdir variable will become CONFIG_QEMU_XXXDIR as well (instead of becoming a CONFIG_QEMU_QEMU_XXXDIR define).

Changes v1 -> v2:
- Rebase on top of newer qemu.git changes, that changed "tr '[:lower:]' '[:upper:]'" to "LC_ALL=C tr '[a-z]' '[A-Z]'".

---
 scripts/create_config |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
scripts/create_config +9 -0
index 470e05e..f9ba2f5 100755
@@ -13,6 +13,15 @@ case $line in
     pkgversion=${line#*=}
     echo "#define QEMU_PKGVERSION \"$pkgversion\""
     ;;
+ qemu_*dir=*) # qemu-specific directory configuration
+    name=${line%=*}
+    value=${line#*=}
+    define_name=`echo $name | LC_ALL=C tr '[a-z]' '[A-Z]'`
+    eval "define_value=\"$value\""
+    echo "#define CONFIG_$define_name \"$define_value\""
+    # save for the next definitions
+    eval "$name=\$define_value"
+    ;;
  prefix=* | [a-z]*dir=*) # directory configuration
     name=${line%=*}
     value=${line#*=}
Signature · 1 line
1.7.3.2
#3 lore raw

PATCH v4 3/14 configure: rename $confdir to $qemu_confdir

In reply to Eduardo Habkost

There's no "confdir" variable on Autoconf, but it's good to make it clear that it's a variable for the Qemu-specific subdirectory inside $sysconfdir.

---
 configure |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
configure +2 -2
index 0cdc9ac..95fa530 100755
@@ -2837,7 +2837,7 @@ if test "$mingw32" = "yes" ; then
     done
 fi
 
-confdir=$sysconfdir$confsuffix
+qemu_confdir=$sysconfdir$confsuffix
 
 tools=
 if test "$softmmu" = yes ; then
@@ -2983,7 +2983,7 @@ echo "mandir=$mandir" >> $config_host_mak
 echo "datadir=$qemu_datadir" >> $config_host_mak
 echo "sysconfdir=$sysconfdir" >> $config_host_mak
 echo "docdir=$qemu_docdir" >> $config_host_mak
-echo "confdir=$confdir" >> $config_host_mak
+echo "confdir=$qemu_confdir" >> $config_host_mak
 echo "libexecdir=\${prefix}/libexec" >> $config_host_mak
 echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
 echo "CONFIG_QEMU_HELPERDIR=\"$prefix/libexec\"" >> $config_host_mak
Signature · 1 line
1.7.3.2
#9 lore raw

PATCH v4 9/14 config-host.mak: remove CONFIG_QEMU_SHAREDIR

In reply to Eduardo Habkost

There is no code using that variable according to 'git grep', so kill it.

---
 configure |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
configure +0 -1
index f15b714..eca08bb 100755
@@ -2985,7 +2985,6 @@ echo "sysconfdir=$sysconfdir" >> $config_host_mak
 echo "qemu_docdir=$qemu_docdir" >> $config_host_mak
 echo "qemu_confdir=$qemu_confdir" >> $config_host_mak
 echo "libexecdir=\${prefix}/libexec" >> $config_host_mak
-echo "CONFIG_QEMU_SHAREDIR=\"$prefix$datasuffix\"" >> $config_host_mak
 echo "CONFIG_QEMU_HELPERDIR=\"$prefix/libexec\"" >> $config_host_mak
 
 echo "ARCH=$ARCH" >> $config_host_mak
Signature · 1 line
1.7.3.2