qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and ana


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions
Date: Mon, 16 May 2016 10:20:44 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

On 05/16/2016 09:35 AM, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
>  scripts/analyze-inclusions | 102 
> +++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 102 insertions(+)
>  create mode 100644 scripts/analyze-inclusions
> 

> +#
> +# 2) otherwise, it will configure and builds QEMU itself in a

s/builds/build/

> +# "+build" subdirectory which is left around when the script
> +# exits.  In this case the command line is passed directly to
> +# "make" (typically used for a "-j" argument suitable for your
> +# system).
> +#
> +# Inspired by a post by Markus Armbruster.
> +
> +case "x$1" in
> +--)

This branch of the case isn't reachable. Did you mean x--) ?

> +  shift
> +  cd "$1" || exit $?
> +  ;;
> +x-* | x)
> +  mkdir -p +build
> +  cd +build

Is this safe even when CDPATH is set?  You can force it to be safe by
using cd ./+build

> +  test -f Makefile && make distclean
> +  ../configure
> +  make "$@"
> +  ;;
> +*)
> +  cd "$1" || exit $?
> +esac
> +
> +QEMU_CFLAGS=$(sed -n s/^QEMU_CFLAGS=//p config-host.mak)
> +QEMU_INCLUDES=$(sed -n s/^QEMU_INCLUDES=//p config-host.mak | \
> +    sed 's/$(SRC_PATH)/../g' )

Could avoid a 'sed | sed' by doing:

QEMU_INCLUDES=$(sed -n '/^QEMU_INCLUDES=/ s/$(SRC_PATH)/../gp' \
  config-host.mak)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]