Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JUPsi-0006ov-3A for qemu-devel@nongnu.org; Wed, 27 Feb 2008 12:15:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JUPsg-0006oB-Bw for qemu-devel@nongnu.org; Wed, 27 Feb 2008 12:15:47 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JUPsg-0006o5-64 for qemu-devel@nongnu.org; Wed, 27 Feb 2008 12:15:46 -0500 Received: from smtp02.citrix.com ([66.165.176.63]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JUPsf-0008Jd-Mj for qemu-devel@nongnu.org; Wed, 27 Feb 2008 12:15:45 -0500 Received: from mariner.uk.xensource.com (mariner.uk.xensource.com [172.31.17.38]) by smtp01.ad.xensource.com (8.13.1/8.13.1) with ESMTP id m1RHF164007497 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 27 Feb 2008 09:15:03 -0800 Received: from iwj by mariner.uk.xensource.com with local (Exim 4.63) (envelope-from ) id 1JUPrv-00006E-NW for qemu-devel@nongnu.org; Wed, 27 Feb 2008 17:14:59 +0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="EihculJBr1" Content-Transfer-Encoding: 7bit Message-ID: <18373.39571.721734.174043@mariner.uk.xensource.com> Date: Wed, 27 Feb 2008 17:14:59 +0000 From: Ian Jackson Subject: [Qemu-devel] [PATCH] Properly bomb out on errors in Makefile shell fragments Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org --EihculJBr1 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Without `set -e', or the use of &&, errors in commands run from Makefiles in multi-command fragments are not trapped. ( ) are redundant in multi-command shell fragments. Ian. --EihculJBr1 Content-Type: text/plain Content-Description: set -e and && as appropriate Content-Disposition: inline; filename="qemu-makefile-errors.patch" Content-Transfer-Encoding: 7bit diff --git a/Makefile b/Makefile index d74aa6e..89c4bd6 100644 --- a/Makefile +++ b/Makefile @@ -193,14 +193,14 @@ ifneq ($(TOOLS),) $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)" endif mkdir -p "$(DESTDIR)$(datadir)" - for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ + set -e; for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ video.x openbios-sparc32 pxe-ne2k_pci.bin \ pxe-rtl8139.bin pxe-pcnet.bin; do \ $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \ done ifndef CONFIG_WIN32 mkdir -p "$(DESTDIR)$(datadir)/keymaps" - for x in $(KEYMAPS); do \ + set -e; for x in $(KEYMAPS); do \ $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \ done endif @@ -251,12 +251,12 @@ FILE = qemu-$(VERSION) tar: rm -rf /tmp/$(FILE) cp -r . /tmp/$(FILE) - ( cd /tmp ; tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS ) + cd /tmp && tar zcvf ~/$(FILE).tar.gz $(FILE) --exclude CVS rm -rf /tmp/$(FILE) # generate a binary distribution tarbin: - ( cd / ; tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \ + cd / && tar zcvf ~/qemu-$(VERSION)-$(ARCH).tar.gz \ $(bindir)/qemu \ $(bindir)/qemu-system-ppc \ $(bindir)/qemu-system-ppc64 \ @@ -301,7 +301,7 @@ tarbin: $(datadir)/pxe-pcnet.bin \ $(docdir)/qemu-doc.html \ $(docdir)/qemu-tech.html \ - $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 ) + $(mandir)/man1/qemu.1 $(mandir)/man1/qemu-img.1 # Include automatically generated dependency files -include $(wildcard *.d audio/*.d slirp/*.d) --EihculJBr1--