From nobody Mon Feb 9 09:32:30 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1575024847; cv=none; d=zohomail.com; s=zohoarc; b=IZjJLavjUlj8/tIQUkodaiyihcX3DEWCXu90gqrlNKZAFnuK+cH7nzEzmCcbN6W0DSKDDI3z1TJkKHv8Gfqm0wKrAdTFvNFgsjFILEuAOvSRaMKb+lLluafOernd20YFLtmz4SBzTnP/y2OkcA5GMkylK3bJRUBe434JpyxAUbs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1575024847; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NuFJtOeLCF+ZRD2qYbBHzg3Tz1iz/6vPD326Ir0gOQQ=; b=PMu/9Mv4uu5SgGW+qo5YqZ0azKLohiEBYmHuez3Fi7P3rLBRxywnEF47i5RMk3LLbF/HzKULH//XTNLEIVWTY9ijw1W6Bj2Prb2n8NKAMXOxinZAVsuF0gHK2zdl8Zx8V/FbOl43EIPKKtf7OaPzx5yxtxga3ap8G7uSNBUq2CA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15750248476136.006626640349168; Fri, 29 Nov 2019 02:54:07 -0800 (PST) Received: from localhost ([::1]:57046 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iaduY-00061e-AR for importer@patchew.org; Fri, 29 Nov 2019 05:54:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38575) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iad3z-0001RF-JU for qemu-devel@nongnu.org; Fri, 29 Nov 2019 04:59:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iad3t-0004DN-6n for qemu-devel@nongnu.org; Fri, 29 Nov 2019 04:59:42 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:49727 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iad3s-000408-0L for qemu-devel@nongnu.org; Fri, 29 Nov 2019 04:59:41 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-20-76w3fbA0OFK-8QpARZ5gFg-1; Fri, 29 Nov 2019 04:59:30 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 59FF310054E3; Fri, 29 Nov 2019 09:59:29 +0000 (UTC) Received: from blackfin.pond.sub.org (ovpn-116-134.ams2.redhat.com [10.36.116.134]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25F0360BE2; Fri, 29 Nov 2019 09:59:29 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id A9A611138606; Fri, 29 Nov 2019 10:59:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575021577; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NuFJtOeLCF+ZRD2qYbBHzg3Tz1iz/6vPD326Ir0gOQQ=; b=hjr8wtMNLYmb3USKVnmvpossY6nPte1cEqV3kh3fQU1XqEy0V/HZmRPOp1aK42JTx1+JN5 o34U+4aDiptZ3L6hDhcODKsrv2zdyurE5aT9uzrLw/6tmpE/xWvDg87QtpxNl0QqV2yLUz TwWAAGmmhGxvzN5ExlZGIlt1/MTszlo= From: Markus Armbruster To: qemu-devel@nongnu.org Subject: [PATCH 7/6] Makefile: Make Makefile depend on generated qga files, too Date: Fri, 29 Nov 2019 10:59:27 +0100 Message-Id: <20191129095927.17382-1-armbru@redhat.com> In-Reply-To: <20191120182551.23795-1-armbru@redhat.com> References: <20191120182551.23795-1-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: 76w3fbA0OFK-8QpARZ5gFg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, mdroth@linux.vnet.ibm.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Generated .h need to be generated before compiling any .c using them. To know which .h a .c uses, we need to compile it. Since commit 4115852bb0 "build: do not sprinkle around GENERATED_HEADERS dependencies", we break this circular dependency the simple & stupid way: the generated headers are a prerequisite of Makefile, which causes Make to generate them first, then start over. Except for qga we still use the older method of making all its .o summarily depend on all its generated .h (commit 016c77ad62 "Makefile: add missing deps on $(GENERATED_HEADERS)"). Add qga's generated files to generated-files-y to get rid of this exception. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- Makefile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 8dad949483..d4138343cd 100644 --- a/Makefile +++ b/Makefile @@ -130,6 +130,15 @@ GENERATED_QAPI_FILES +=3D qapi/qapi-doc.texi =20 generated-files-y +=3D $(GENERATED_QAPI_FILES) =20 +GENERATED_QGA_FILES :=3D qga-qapi-types.c qga-qapi-types.h +GENERATED_QGA_FILES +=3D qga-qapi-visit.c qga-qapi-visit.h +GENERATED_QGA_FILES +=3D qga-qapi-commands.h qga-qapi-commands.c +GENERATED_QGA_FILES +=3D qga-qapi-init-commands.h qga-qapi-init-commands.c +GENERATED_QGA_FILES +=3D qga-qapi-doc.texi +GENERATED_QGA_FILES :=3D $(addprefix qga/qapi-generated/, $(GENERATED_QGA_= FILES)) + +generated-files-y +=3D $(GENERATED_QGA_FILES) + generated-files-y +=3D trace/generated-tcg-tracers.h =20 generated-files-y +=3D trace/generated-helpers-wrappers.h @@ -608,12 +617,7 @@ $(SRC_PATH)/scripts/qapi/types.py \ $(SRC_PATH)/scripts/qapi/visit.py \ $(SRC_PATH)/scripts/qapi-gen.py =20 -qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h \ -qga/qapi-generated/qga-qapi-visit.c qga/qapi-generated/qga-qapi-visit.h \ -qga/qapi-generated/qga-qapi-commands.h qga/qapi-generated/qga-qapi-command= s.c \ -qga/qapi-generated/qga-qapi-init-commands.h qga/qapi-generated/qga-qapi-in= it-commands.c \ -qga/qapi-generated/qga-qapi-doc.texi: \ -qga/qapi-generated/qapi-gen-timestamp ; +$(GENERATED_QGA_FILES): qga/qapi-generated/qapi-gen-timestamp ; qga/qapi-generated/qapi-gen-timestamp: $(SRC_PATH)/qga/qapi-schema.json $(= qapi-py) $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \ -o qga/qapi-generated -p "qga-" $<, \ @@ -630,9 +634,6 @@ qapi-gen-timestamp: $(qapi-modules) $(qapi-py) "GEN","$(@:%-timestamp=3D%)") @>$@ =20 -QGALIB_GEN=3D$(addprefix qga/qapi-generated/, qga-qapi-types.h qga-qapi-vi= sit.h qga-qapi-commands.h qga-qapi-init-commands.h) -$(qga-obj-y): $(QGALIB_GEN) - qemu-ga$(EXESUF): $(qga-obj-y) $(COMMON_LDADDS) $(call LINK, $^) =20 @@ -722,7 +723,7 @@ clean: recurse-clean rm -f trace/generated-tracers-dtrace.h* rm -f $(foreach f,$(generated-files-y),$(f) $(f)-timestamp) rm -f qapi-gen-timestamp - rm -rf qga/qapi-generated + rm -f qga/qapi-generated/qapi-gen-timestamp rm -f config-all-devices.mak =20 VERSION ?=3D $(shell cat VERSION) --=20 2.21.0