qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH RFC] Makefile: fix parallel build after "make clean"


From: Igor Mitsyanko
Subject: [Qemu-devel] [PATCH RFC] Makefile: fix parallel build after "make clean" execution
Date: Fri, 20 Jul 2012 23:23:28 +0400

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 <address@hidden>
---
 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




reply via email to

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