Skip to contentSkip to conversation

Add ability to disable build of all targets

PATCH Applied Daniel P. Berrange 7 participants 11 messages Sep 10, 2012 – Sep 14, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add ability to disable build of all targets

From: "Daniel P. Berrange" <[email protected]>

Allow passing of '--target-list=' to configure to request that all targets are to be disabled. This allows for doing a very fast tools-only build of things like qemu-img, qemu-io, qemu-nbd.

---
 configure | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
configure +4 -9
index 75dc9da..472374e 100755
@@ -127,7 +127,7 @@ cc_i386=i386-pc-linux-gnu-gcc
 libs_qga=""
 debug_info="yes"
 
-target_list=""
+target_list="DEFAULT"
 
 # Default value for a variable defining feature "foo".
 #  * foo="no"  feature will only be used if --enable-foo arg is given
@@ -1319,15 +1319,10 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
   exit 1
 fi
 
-if test -z "$target_list" ; then
-    target_list="$default_target_list"
-else
-    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
-fi
-if test -z "$target_list" ; then
-    echo "No targets enabled"
-    exit 1
+if test "$target_list" = "DEFAULT" ; then
+    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
 fi
+
 # see if system emulation was really requested
 case " $target_list " in
   *"-softmmu "*) softmmu=yes
Signature · 1 line
1.7.11.2
#1 lore raw
Quoted 7 lines · Daniel P. Berrange

From: "Daniel P. Berrange" <[email protected]>

Allow passing of '--target-list=' to configure to request that all targets are to be disabled. This allows for doing a very fast tools-only build of things like qemu-img, qemu-io, qemu-nbd.

Applied. Thanks.

Regards,

Anthony Liguori

Quoted 38 lines
---
 configure | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
configure +4 -9
index 75dc9da..472374e 100755
@@ -127,7 +127,7 @@ cc_i386=i386-pc-linux-gnu-gcc
 libs_qga=""
 debug_info="yes"
 
-target_list=""
+target_list="DEFAULT"
 
 # Default value for a variable defining feature "foo".
 #  * foo="no"  feature will only be used if --enable-foo arg is given
@@ -1319,15 +1319,10 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
   exit 1
 fi
 
-if test -z "$target_list" ; then
-    target_list="$default_target_list"
-else
-    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
-fi
-if test -z "$target_list" ; then
-    echo "No targets enabled"
-    exit 1
+if test "$target_list" = "DEFAULT" ; then
+    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
 fi
+
 # see if system emulation was really requested
 case " $target_list " in
   *"-softmmu "*) softmmu=yes
Signature · 1 line
1.7.11.2
#2 lore raw
Quoted 11 lines · Anthony Liguori
Quoted 7 lines · Daniel P. Berrange

From: "Daniel P. Berrange" <[email protected]>

Allow passing of '--target-list=' to configure to request that all targets are to be disabled. This allows for doing a very fast tools-only build of things like qemu-img, qemu-io, qemu-nbd.

Applied. Thanks.

This patch broke the --target-list option:

  $ ./configure --target-list=x86_64-linux-user,x86_64-softmmu
  [...]
  ERROR: Target 'x86_64-linux-user,x86_64-softmmu' not recognised
  $ 
Quoted 44 lines

Regards,

Anthony Liguori

Quoted 38 lines
---
 configure | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
configure +4 -9
index 75dc9da..472374e 100755
@@ -127,7 +127,7 @@ cc_i386=i386-pc-linux-gnu-gcc
 libs_qga=""
 debug_info="yes"
 
-target_list=""
+target_list="DEFAULT"
 
 # Default value for a variable defining feature "foo".
 #  * foo="no"  feature will only be used if --enable-foo arg is given
@@ -1319,15 +1319,10 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
   exit 1
 fi
 
-if test -z "$target_list" ; then
-    target_list="$default_target_list"
-else
-    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
-fi
-if test -z "$target_list" ; then
-    echo "No targets enabled"
-    exit 1
+if test "$target_list" = "DEFAULT" ; then
+    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
 fi
+
 # see if system emulation was really requested
 case " $target_list " in
   *"-softmmu "*) softmmu=yes
Signature · 1 line
1.7.11.2
Signature · 1 line
Eduardo
#3 lore raw

PATCH 1/1 configure: fix "--target-list=<target>, <target>, ..." option

commit 66d5499b3754b83c09487259c08fe2ce73188a59 broke the support for comma-separated target lists on the --target-list option. e.g.:

  $ ./configure --target-list=x86_64-linux-user,x86_64-softmmu
  [...]
  ERROR: Target 'x86_64-linux-user,x86_64-softmmu' not recognised
  $

This patch restores that ability.

Cc Daniel P. Berrange <[email protected]>
Cc Anthony Liguori <[email protected]>
---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
configure +3 -1
index 7656c32..9ee7038 100755
@@ -1323,7 +1323,9 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
 fi
 
 if test "$target_list" = "DEFAULT" ; then
-    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
+    target_list="$default_target_list"
+else
+    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
 fi
 
 # see if system emulation was really requested
Signature · 1 line
1.7.11.4
Tested-by on v1 1/1
#4 lore raw

Re: [Qemu-devel] [PATCH] configure: fix "--target-list=<target>, <target>, ..." option

Quoted 8 lines · Eduardo Habkost

commit 66d5499b3754b83c09487259c08fe2ce73188a59 broke the support for comma-separated target lists on the --target-list option. e.g.:

  $ ./configure --target-list=x86_64-linux-user,x86_64-softmmu
  [...]
  ERROR: Target 'x86_64-linux-user,x86_64-softmmu' not recognised
  $

Broke for me too. This patch fixes it.

Quoted 3 lines

This patch restores that ability.

Quoted 25 lines
Cc Daniel P. Berrange <[email protected]>
Cc Anthony Liguori <[email protected]>
---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
configure +3 -2
index 7656c32..9ee7038 100755
@@ -1323,7 +1323,9 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
 fi
 
 if test "$target_list" = "DEFAULT" ; then
-    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
+    target_list="$default_target_list"
+else
+    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
 fi
 
 # see if system emulation was really requested
--

1.7.11.4

#5 lore raw

Re: [Qemu-devel] [PATCH] configure: fix "--target-list=<target>, <target>, ..." option

In reply to Eduardo Habkost

Sorry, I had missed this patch...

Quoted 22 lines · Eduardo Habkost

commit 66d5499b3754b83c09487259c08fe2ce73188a59 broke the support for comma-separated target lists on the --target-list option. e.g.:

  $ ./configure --target-list=x86_64-linux-user,x86_64-softmmu
  [...]
  ERROR: Target 'x86_64-linux-user,x86_64-softmmu' not recognised
  $

This patch restores that ability.

Cc Daniel P. Berrange <[email protected]>
Cc Anthony Liguori <[email protected]>
---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
configure +0 -0
index 7656c32..9ee7038 100755

configure if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_ · line 1329

Quoted 8 lines
configure +3 -1
@@ -1323,7 +1323,9 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
 fi
 
 if test "$target_list" = "DEFAULT" ; then
-    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
+    target_list="$default_target_list"
+else
+    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
 fi

This works for me too.

But I still can't get what the original patch posted by Daniel Berrange intended to do:

$ ./configure --target-list=
$ make V=1
cat  | grep =y | sort -u > config-all-devices.mak

And it of course hangs there.

Creating an empty config-all-devices.mak before running make solves the issue.

Laurent

Quoted 5 lines
configure +0 -1
 # see if system emulation was really requested
--

1.7.11.4

#6 lore raw

Re: [Qemu-devel] [PATCH] configure: fix "--target-list=<target>, <target>, ..." option

Quoted 36 lines · Laurent Desnogues

Sorry, I had missed this patch...

Quoted 22 lines · Eduardo Habkost

commit 66d5499b3754b83c09487259c08fe2ce73188a59 broke the support for comma-separated target lists on the --target-list option. e.g.:

  $ ./configure --target-list=x86_64-linux-user,x86_64-softmmu
  [...]
  ERROR: Target 'x86_64-linux-user,x86_64-softmmu' not recognised
  $

This patch restores that ability.

Cc Daniel P. Berrange <[email protected]>
Cc Anthony Liguori <[email protected]>
---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
configure +0 -0
index 7656c32..9ee7038 100755

configure if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_ · line 1329

Quoted 8 lines
configure +3 -1
@@ -1323,7 +1323,9 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
 fi
 
 if test "$target_list" = "DEFAULT" ; then
-    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
+    target_list="$default_target_list"
+else
+    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
 fi

This works for me too.

Quoted 8 lines

But I still can't get what the original patch posted by Daniel Berrange intended to do:

$ ./configure --target-list=
$ make V=1
cat  | grep =y | sort -u > config-all-devices.mak

And it of course hangs there.

Hmm. Perhaps we should just revert 66d5499b3 and then recommit a working implementation later?

-- PMM

#7 lore raw

Re: [Qemu-devel] [PATCH] configure: fix "--target-list=<target>, <target>, ..." option

Quoted 41 lines · Peter Maydell
Quoted 39 lines · Laurent Desnogues

Sorry, I had missed this patch...

Quoted 22 lines · Eduardo Habkost

commit 66d5499b3754b83c09487259c08fe2ce73188a59 broke the support for comma-separated target lists on the --target-list option. e.g.:

  $ ./configure --target-list=x86_64-linux-user,x86_64-softmmu
  [...]
  ERROR: Target 'x86_64-linux-user,x86_64-softmmu' not recognised
  $

This patch restores that ability.

Cc Daniel P. Berrange <[email protected]>
Cc Anthony Liguori <[email protected]>
---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
configure +0 -0
index 7656c32..9ee7038 100755

configure if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_ · line 1329

Quoted 8 lines
configure +3 -1
@@ -1323,7 +1323,9 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
 fi
 
 if test "$target_list" = "DEFAULT" ; then
-    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
+    target_list="$default_target_list"
+else
+    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
 fi

This works for me too.

But I still can't get what the original patch posted by Daniel Berrange intended to do:

Quoted 8 lines
Quoted 5 lines
$ ./configure --target-list=
$ make V=1
cat  | grep =y | sort -u > config-all-devices.mak

And it of course hangs there.

Hmm. Perhaps we should just revert 66d5499b3 and then recommit a working implementation later?

I think this is a good idea.

Regards,

Anthony Liguori

Quoted 2 lines

-- PMM

#8 lore raw

Re: [Qemu-devel] [PATCH] configure: fix "--target-list=<target>, <target>, ..." option

In reply to Peter Maydell
Quoted 38 lines · Peter Maydell
Quoted 36 lines · Laurent Desnogues

Sorry, I had missed this patch...

Quoted 22 lines · Eduardo Habkost

commit 66d5499b3754b83c09487259c08fe2ce73188a59 broke the support for comma-separated target lists on the --target-list option. e.g.:

  $ ./configure --target-list=x86_64-linux-user,x86_64-softmmu
  [...]
  ERROR: Target 'x86_64-linux-user,x86_64-softmmu' not recognised
  $

This patch restores that ability.

Cc Daniel P. Berrange <[email protected]>
Cc Anthony Liguori <[email protected]>
---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
configure +0 -0
index 7656c32..9ee7038 100755

configure if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_ · line 1329

Quoted 8 lines
configure +3 -1
@@ -1323,7 +1323,9 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
 fi
 
 if test "$target_list" = "DEFAULT" ; then
-    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
+    target_list="$default_target_list"
+else
+    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
 fi

This works for me too.

Quoted 8 lines
Quoted 8 lines

But I still can't get what the original patch posted by Daniel Berrange intended to do:

$ ./configure --target-list=
$ make V=1
cat  | grep =y | sort -u > config-all-devices.mak

And it of course hangs there.

Urgh, I see what went wrong. When I tested it, I still had a previously generated 'config-all-devices.mak' so this broken rule never hit me.

When I 'git clean -f -x -d', then I see the same problem as you descibe.

Quoted 2 lines

Hmm. Perhaps we should just revert 66d5499b3 and then recommit a working implementation later?

Agreed, sorry for the screw up with this patch.

Daniel

Signature · 4 lines
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|
#9 lore raw

Re: [Qemu-devel] [PATCH] configure: fix "--target-list=<target>, <target>, ..." option

In reply to Peter Maydell

Am 14.09.2012 14:53, schrieb Peter Maydell:

Quoted 45 lines
Quoted 43 lines · Laurent Desnogues

Sorry, I had missed this patch...

Quoted 22 lines · Eduardo Habkost

commit 66d5499b3754b83c09487259c08fe2ce73188a59 broke the support for comma-separated target lists on the --target-list option. e.g.:

   $ ./configure --target-list=x86_64-linux-user,x86_64-softmmu
   [...]
   ERROR: Target 'x86_64-linux-user,x86_64-softmmu' not recognised
   $

This patch restores that ability.

Cc Daniel P. Berrange<[email protected]>
Cc Anthony Liguori<[email protected]>
---
  configure | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
configure +0 -0
index 7656c32..9ee7038 100755

configure if ! "$python" -c 'import sys; sys.exit(sys.version_info< (2,4) or sys.version_ · line 1329

Quoted 8 lines
configure +3 -1
@@ -1323,7 +1323,9 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info<  (2,4) or sys.version_
  fi
 
  if test "$target_list" = "DEFAULT" ; then
-    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
+    target_list="$default_target_list"
+else
+    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
  fi

This works for me too.

But I still can't get what the original patch posted by Daniel Berrange intended to do:

$ ./configure --target-list=
$ make V=1
cat  | grep =y | sort -u>  config-all-devices.mak
Quoted 6 lines
Quoted 1 line

And it of course hangs there.

Hmm. Perhaps we should just revert 66d5499b3 and then recommit a working implementation later?

-- PMM

make hangs while waiting for input on stdin:
if there is no emulation target, 'cat' is called without arguments.

I have sent a patch which fixes this. It can be applied after reverting 66d5499b3 (which is not needed to get builds without emulation targets).

Regards
Stefan W.

#10 lore raw
In reply to Eduardo Habkost
Quoted 11 lines · Eduardo Habkost
Quoted 10 lines · Anthony Liguori
Quoted 7 lines · Daniel P. Berrange

From: "Daniel P. Berrange" <[email protected]>

Allow passing of '--target-list=' to configure to request that all targets are to be disabled. This allows for doing a very fast tools-only build of things like qemu-img, qemu-io, qemu-nbd.

Quoted 8 lines
Quoted 1 line

Applied. Thanks.

This patch broke the --target-list option:

  $ ./configure --target-list=x86_64-linux-user,x86_64-softmmu
  [...]
  ERROR: Target 'x86_64-linux-user,x86_64-softmmu' not recognised
  $

It also seems to not even allow to use --target-list=. On my setup (CentOS 5.6, building in the git directory) the build process just hangs here:

$ make V=1
cat  | grep =y | sort -u > config-all-devices.mak

Laurent

Quoted 48 lines
Quoted 35 lines

Regards,

Anthony Liguori

Quoted 30 lines
---
 configure | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
configure +2 -9
index 75dc9da..472374e 100755
@@ -127,7 +127,7 @@ cc_i386=i386-pc-linux-gnu-gcc
 libs_qga=""
 debug_info="yes"
 
-target_list=""
+target_list="DEFAULT"
 
 # Default value for a variable defining feature "foo".
 #  * foo="no"  feature will only be used if --enable-foo arg is given
@@ -1319,15 +1319,10 @@ if ! "$python" -c 'import sys; sys.exit(sys.version_info < (2,4) or sys.version_
   exit 1
 fi
 
-if test -z "$target_list" ; then
-    target_list="$default_target_list"
-else
-    target_list=`echo "$target_list" | sed -e 's/,/ /g'`
-fi
-if test -z "$target_list" ; then
-    echo "No targets enabled"
-    exit 1
+if test "$target_list" = "DEFAULT" ; then
Quoted 9 lines
Quoted 8 lines
configure +2 -1
+    target_list=`echo "$default_target_list" | sed -e 's/,/ /g'`
 fi
+
 # see if system emulation was really requested
 case " $target_list " in
   *"-softmmu "*) softmmu=yes
--

1.7.11.2

--
Eduardo