Received: from eggs.gnu.org ([208.118.235.92]:45181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsIpc-0004vZ-JQ for qemu-devel@nongnu.org; Fri, 20 Jul 2012 15:28:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsIna-0008LP-Iq for qemu-devel@nongnu.org; Fri, 20 Jul 2012 15:25:44 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:50266) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsIna-0008Fw-C9 for qemu-devel@nongnu.org; Fri, 20 Jul 2012 15:23:38 -0400 Received: from eusync3.samsung.com (mailout3.w1.samsung.com [210.118.77.13]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0M7H00HEF4K9JA50@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Fri, 20 Jul 2012 20:24:09 +0100 (BST) Received: from idodo.rnd.samsung.ru ([106.109.9.94]) by eusync3.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0M7H00MY54J40740@eusync3.samsung.com> for qemu-devel@nongnu.org; Fri, 20 Jul 2012 20:23:34 +0100 (BST) From: Igor Mitsyanko Date: Fri, 20 Jul 2012 23:23:28 +0400 Message-id: <1342812208-20138-1-git-send-email-i.mitsyanko@samsung.com> Subject: [Qemu-devel] [PATCH RFC] Makefile: fix parallel build after "make clean" execution List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kyungmin.park@samsung.com, Igor Mitsyanko , e.voevodin@samsung.com If you configure qemu, then run "make clean" and then execute "make -jx" command, build will fail with error: cc1: error: qapi-generated: No such file or directory [-Werror] This happens because qemu guest agent build screws up its dependencies. This Makefile line: qemu-ga$(EXESUF): QEMU_CFLAGS += -I qapi-generated for some reason causes all qemu-ga dependencies (qemu-ga.o $(qga-obj-y) $(tools-obj-y) $(qapi-obj-y) $(qobject-obj-y) $(version-obj-y) $(QGALIB_OBJ)) to be dependant on "qapi-generated" directory. This directory is created by python qapi scripts, or by configure script (this is why parallel build works fine after ./configure if you havn't run "make clean"). Another reason to apply this fix is that CFLAGS are more related to object files (meaning $(qga-obj-y)) then to executable file qemu-ga$(EXESUF). Signed-off-by: Igor Mitsyanko --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index ab82ef3..ff54843 100644 --- a/Makefile +++ b/Makefile @@ -173,7 +173,7 @@ qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@," GEN $@") qemu-ga$(EXESUF): LIBS = $(LIBS_QGA) -qemu-ga$(EXESUF): QEMU_CFLAGS += -I qapi-generated +$(qga-obj-y): QEMU_CFLAGS += -I qapi-generated gen-out-type = $(subst .,-,$(suffix $@)) -- 1.7.5.4