From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2LGG-0004lU-9v for qemu-devel@nongnu.org; Mon, 16 May 2016 12:20:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2LGA-0000bX-8z for qemu-devel@nongnu.org; Mon, 16 May 2016 12:20:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41855) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2LG9-0000bM-Qo for qemu-devel@nongnu.org; Mon, 16 May 2016 12:20:46 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4A76746267 for ; Mon, 16 May 2016 16:20:45 +0000 (UTC) References: <1463412982-6681-1-git-send-email-pbonzini@redhat.com> <1463412982-6681-2-git-send-email-pbonzini@redhat.com> From: Eric Blake Message-ID: <5739F35C.6030000@redhat.com> Date: Mon, 16 May 2016 10:20:44 -0600 MIME-Version: 1.0 In-Reply-To: <1463412982-6681-2-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TEDd7LgIgv2gk8jLLe6djGnmjtc30TFfb" Subject: Re: [Qemu-devel] [PATCH 01/50] scripts: add script to build QEMU and analyze inclusions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TEDd7LgIgv2gk8jLLe6djGnmjtc30TFfb Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 >=20 > +# > +# 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=3D$(sed -n s/^QEMU_CFLAGS=3D//p config-host.mak) > +QEMU_INCLUDES=3D$(sed -n s/^QEMU_INCLUDES=3D//p config-host.mak | \ > + sed 's/$(SRC_PATH)/../g' ) Could avoid a 'sed | sed' by doing: QEMU_INCLUDES=3D$(sed -n '/^QEMU_INCLUDES=3D/ s/$(SRC_PATH)/../gp' \ config-host.mak) --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --TEDd7LgIgv2gk8jLLe6djGnmjtc30TFfb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXOfNcAAoJEKeha0olJ0NqJWwH+QGhApx41TUuEQ5uINSzqmFt dAYT6DG7kO8R554whTjC8BND+n2dFZy22FGQCuKNJBVPG2Tt//Uj9Hl6z/tLuhNE wsrbWieqxaQWI/4olhJ/t0BWZ1MqFerCQ6UjByT3uCjlUF9Qm+mQjbzgWojT9A+B JzBztEu1BtCQZQS6xTVrANIlVe6uiKk6XgA06cKonFHIZoI6yXN5VKIMAX3li9aY ZNn78lNr8wE8m2Zho/VlVrUG9RAKj0P4FfRh2JMhpl/PLh75rpLrbt9wclH3Ib20 BxisWsXBa+vhi0bj/Z9QLopsMH/AAfqhtK6ikiwXWtx1Hf8inK7bS583+SeH/Gw= =tSyB -----END PGP SIGNATURE----- --TEDd7LgIgv2gk8jLLe6djGnmjtc30TFfb--