On 05/16/2016 09:35 AM, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > 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