[Qemu-devel] [PATCH] configure: fix trace backend list for out-of-tree builds

Greg Kurz posted 1 patch 6 years, 12 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/149321290672.6890.14889421479138766387.stgit@bahia
Test docker passed
Test s390x passed
There is a newer version of this series
configure |    2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[Qemu-devel] [PATCH] configure: fix trace backend list for out-of-tree builds
Posted by Greg Kurz 6 years, 12 months ago
Since commit "c53eeaf75a04 configure: eliminate Python dependency for
--help", configure --help fails to produce the list of available trace
backends if invoked out-of-tree. It also spits the following error:

grep: scripts/tracetool/backend/*.py: No such file or directory

This patch simply adds the missing $source_path to fix it.

Signed-off-by: Greg Kurz <groug@kaod.org>
---
 configure |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index c35acf119261..96847b092c8d 100755
--- a/configure
+++ b/configure
@@ -1271,7 +1271,7 @@ for config in $mak_wilds; do
 done
 
 # Enumerate public trace backends for --help output
-trace_backend_list=$(echo $(grep -le '^PUBLIC = True$' scripts/tracetool/backend/*.py | sed -e 's/^.*\/\(.*\)\.py$/\1/'))
+trace_backend_list=$(echo $(grep -le '^PUBLIC = True$' $source_path/scripts/tracetool/backend/*.py | sed -e 's/^.*\/\(.*\)\.py$/\1/'))
 
 if test x"$show_help" = x"yes" ; then
 cat << EOF


Re: [Qemu-devel] [PATCH] configure: fix trace backend list for out-of-tree builds
Posted by Peter Maydell 6 years, 12 months ago
On 26 April 2017 at 14:21, Greg Kurz <groug@kaod.org> wrote:
> Since commit "c53eeaf75a04 configure: eliminate Python dependency for
> --help", configure --help fails to produce the list of available trace
> backends if invoked out-of-tree. It also spits the following error:
>
> grep: scripts/tracetool/backend/*.py: No such file or directory
>
> This patch simply adds the missing $source_path to fix it.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
> ---
>  configure |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/configure b/configure
> index c35acf119261..96847b092c8d 100755
> --- a/configure
> +++ b/configure
> @@ -1271,7 +1271,7 @@ for config in $mak_wilds; do
>  done
>
>  # Enumerate public trace backends for --help output
> -trace_backend_list=$(echo $(grep -le '^PUBLIC = True$' scripts/tracetool/backend/*.py | sed -e 's/^.*\/\(.*\)\.py$/\1/'))
> +trace_backend_list=$(echo $(grep -le '^PUBLIC = True$' $source_path/scripts/tracetool/backend/*.py | sed -e 's/^.*\/\(.*\)\.py$/\1/'))

Lots of things will break if $source_path includes a
space in its value, but we don't need to add another one,
so "$source_path" would be better here.

thanks
-- PMM