From nobody Mon May 6 12:12:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1489648075314701.5875474042272; Thu, 16 Mar 2017 00:07:55 -0700 (PDT) Received: from localhost ([::1]:41327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coPVq-0003vu-3c for importer@patchew.org; Thu, 16 Mar 2017 03:07:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coPSk-0001uh-Do for qemu-devel@nongnu.org; Thu, 16 Mar 2017 03:04:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coPSj-0005zi-9X for qemu-devel@nongnu.org; Thu, 16 Mar 2017 03:04:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60584) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1coPSj-0005zc-0m for qemu-devel@nongnu.org; Thu, 16 Mar 2017 03:04:41 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B26861E4C; Thu, 16 Mar 2017 07:04:41 +0000 (UTC) Received: from localhost (ovpn-116-32.ams2.redhat.com [10.36.116.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3BCFE5C3FA; Thu, 16 Mar 2017 07:04:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0B26861E4C Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=stefanha@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0B26861E4C From: Stefan Hajnoczi To: Date: Thu, 16 Mar 2017 15:04:25 +0800 Message-Id: <20170316070427.17120-2-stefanha@redhat.com> In-Reply-To: <20170316070427.17120-1-stefanha@redhat.com> References: <20170316070427.17120-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 16 Mar 2017 07:04:41 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 1/3] makefile: merge GENERATED_HEADERS & GENERATED_SOURCES variables X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" The only functional difference between the GENERATED_HEADERS and GENERATED_SOURCES variables is that 'Makefile' has a dependancy on GENERATED_HEADERS, causing generated header files to be created immediatey at the start of the build process. There is no reason why this early creation should be restricted to the .h files, and not include .c files too. Merge both of the variables into a single GENERATED_FILES variable to make it clear it is for any type of generated file. Signed-off-by: Daniel P. Berrange Reviewed-by: Fam Zheng Message-id: 20170228122901.24520-2-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- Makefile | 35 +++++++++++++++++------------------ Makefile.target | 6 +++--- target/s390x/Makefile.objs | 2 +- tests/Makefile.include | 2 +- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 1c4c04f..a8024c0 100644 --- a/Makefile +++ b/Makefile @@ -50,24 +50,24 @@ endif =20 include $(SRC_PATH)/rules.mak =20 -GENERATED_HEADERS =3D qemu-version.h config-host.h qemu-options.def -GENERATED_HEADERS +=3D qmp-commands.h qapi-types.h qapi-visit.h qapi-event= .h -GENERATED_SOURCES +=3D qmp-marshal.c qapi-types.c qapi-visit.c qapi-event.c -GENERATED_HEADERS +=3D qmp-introspect.h -GENERATED_SOURCES +=3D qmp-introspect.c +GENERATED_FILES =3D qemu-version.h config-host.h qemu-options.def +GENERATED_FILES +=3D qmp-commands.h qapi-types.h qapi-visit.h qapi-event.h +GENERATED_FILES +=3D qmp-marshal.c qapi-types.c qapi-visit.c qapi-event.c +GENERATED_FILES +=3D qmp-introspect.h +GENERATED_FILES +=3D qmp-introspect.c =20 -GENERATED_HEADERS +=3D trace/generated-tcg-tracers.h +GENERATED_FILES +=3D trace/generated-tcg-tracers.h =20 -GENERATED_HEADERS +=3D trace/generated-helpers-wrappers.h -GENERATED_HEADERS +=3D trace/generated-helpers.h -GENERATED_SOURCES +=3D trace/generated-helpers.c +GENERATED_FILES +=3D trace/generated-helpers-wrappers.h +GENERATED_FILES +=3D trace/generated-helpers.h +GENERATED_FILES +=3D trace/generated-helpers.c =20 ifdef CONFIG_TRACE_UST -GENERATED_HEADERS +=3D trace-ust-all.h -GENERATED_SOURCES +=3D trace-ust-all.c +GENERATED_FILES +=3D trace-ust-all.h +GENERATED_FILES +=3D trace-ust-all.c endif =20 -GENERATED_HEADERS +=3D module_block.h +GENERATED_FILES +=3D module_block.h =20 TRACE_HEADERS =3D trace-root.h $(trace-events-subdirs:%=3D%/trace.h) TRACE_SOURCES =3D trace-root.c $(trace-events-subdirs:%=3D%/trace.c) @@ -80,8 +80,8 @@ ifdef CONFIG_TRACE_UST TRACE_HEADERS +=3D trace-ust-root.h $(trace-events-subdirs:%=3D%/trace-ust= .h) endif =20 -GENERATED_HEADERS +=3D $(TRACE_HEADERS) -GENERATED_SOURCES +=3D $(TRACE_SOURCES) +GENERATED_FILES +=3D $(TRACE_HEADERS) +GENERATED_FILES +=3D $(TRACE_SOURCES) =20 trace-group-name =3D $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g') =20 @@ -485,11 +485,10 @@ clean: rm -f fsdev/*.pod rm -f qemu-img-cmds.h rm -f ui/shader/*-vert.h ui/shader/*-frag.h - @# May not be present in GENERATED_HEADERS + @# May not be present in GENERATED_FILES rm -f trace/generated-tracers-dtrace.dtrace* rm -f trace/generated-tracers-dtrace.h* - rm -f $(foreach f,$(GENERATED_HEADERS),$(f) $(f)-timestamp) - rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp) + rm -f $(foreach f,$(GENERATED_FILES),$(f) $(f)-timestamp) rm -rf qapi-generated rm -rf qga/qapi-generated for d in $(ALL_SUBDIRS); do \ @@ -784,7 +783,7 @@ endif # CONFIG_WIN # Add a dependency on the generated files, so that they are always # rebuilt before other object files ifneq ($(filter-out $(UNCHECKED_GOALS),$(MAKECMDGOALS)),$(if $(MAKECMDGOAL= S),,fail)) -Makefile: $(GENERATED_HEADERS) +Makefile: $(GENERATED_FILES) endif =20 .SECONDARY: $(TRACE_HEADERS) $(TRACE_HEADERS:%=3D%-timestamp) \ diff --git a/Makefile.target b/Makefile.target index 924304c..7df2b8c 100644 --- a/Makefile.target +++ b/Makefile.target @@ -162,7 +162,7 @@ else obj-y +=3D hw/$(TARGET_BASE_ARCH)/ endif =20 -GENERATED_HEADERS +=3D hmp-commands.h hmp-commands-info.h +GENERATED_FILES +=3D hmp-commands.h hmp-commands-info.h =20 endif # CONFIG_SOFTMMU =20 @@ -238,5 +238,5 @@ ifdef CONFIG_TRACE_SYSTEMTAP $(INSTALL_DATA) $(QEMU_PROG)-simpletrace.stp "$(DESTDIR)$(qemu_datadir)/.= ./systemtap/tapset/$(QEMU_PROG)-simpletrace.stp" endif =20 -GENERATED_HEADERS +=3D config-target.h -Makefile: $(GENERATED_HEADERS) +GENERATED_FILES +=3D config-target.h +Makefile: $(GENERATED_FILES) diff --git a/target/s390x/Makefile.objs b/target/s390x/Makefile.objs index c573633..46f6a8c 100644 --- a/target/s390x/Makefile.objs +++ b/target/s390x/Makefile.objs @@ -8,7 +8,7 @@ obj-$(CONFIG_KVM) +=3D kvm.o feat-src =3D $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/ feat-dst =3D $(BUILD_DIR)/$(TARGET_DIR) ifneq ($(MAKECMDGOALS),clean) -GENERATED_HEADERS +=3D $(feat-dst)gen-features.h +GENERATED_FILES +=3D $(feat-dst)gen-features.h endif =20 $(feat-dst)gen-features.h: $(feat-dst)gen-features.h-timestamp diff --git a/tests/Makefile.include b/tests/Makefile.include index 346345e..479dcd9 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -482,7 +482,7 @@ qapi-schema +=3D unknown-expr-key.json =20 check-qapi-schema-y :=3D $(addprefix tests/qapi-schema/, $(qapi-schema)) =20 -GENERATED_HEADERS +=3D tests/test-qapi-types.h tests/test-qapi-visit.h \ +GENERATED_FILES +=3D tests/test-qapi-types.h tests/test-qapi-visit.h \ tests/test-qmp-commands.h tests/test-qapi-event.h \ tests/test-qmp-introspect.h =20 --=20 2.9.3 From nobody Mon May 6 12:12:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1489647945886535.4290185988611; Thu, 16 Mar 2017 00:05:45 -0700 (PDT) Received: from localhost ([::1]:41303 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coPTk-00022a-Jg for importer@patchew.org; Thu, 16 Mar 2017 03:05:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coPSs-00020i-TW for qemu-devel@nongnu.org; Thu, 16 Mar 2017 03:04:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coPSp-00061H-Nu for qemu-devel@nongnu.org; Thu, 16 Mar 2017 03:04:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56238) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1coPSp-000619-IW for qemu-devel@nongnu.org; Thu, 16 Mar 2017 03:04:47 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 901BB81245; Thu, 16 Mar 2017 07:04:47 +0000 (UTC) Received: from localhost (ovpn-116-32.ams2.redhat.com [10.36.116.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id F34145DC1D; Thu, 16 Mar 2017 07:04:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 901BB81245 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=stefanha@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 901BB81245 From: Stefan Hajnoczi To: Date: Thu, 16 Mar 2017 15:04:26 +0800 Message-Id: <20170316070427.17120-3-stefanha@redhat.com> In-Reply-To: <20170316070427.17120-1-stefanha@redhat.com> References: <20170316070427.17120-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 16 Mar 2017 07:04:47 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/3] makefile: generate trace-events-all upfront X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" Files should not be created in the build dir during the 'make install' phase. List 'trace-events-all' as a generated file so that it gets created upfront during build. Signed-off-by: Daniel P. Berrange Reviewed-by: Fam Zheng Message-id: 20170228122901.24520-3-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a8024c0..6291764 100644 --- a/Makefile +++ b/Makefile @@ -82,6 +82,7 @@ endif =20 GENERATED_FILES +=3D $(TRACE_HEADERS) GENERATED_FILES +=3D $(TRACE_SOURCES) +GENERATED_FILES +=3D $(BUILD_DIR)/trace-events-all =20 trace-group-name =3D $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g') =20 @@ -592,8 +593,7 @@ endif endif =20 =20 -install: all $(if $(BUILD_DOCS),install-doc) $(BUILD_DIR)/trace-events-all= \ -install-datadir install-localstatedir +install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-local= statedir ifneq ($(TOOLS),) $(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)= $(bindir)) endif --=20 2.9.3 From nobody Mon May 6 12:12:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1489648054889269.2403585839645; Thu, 16 Mar 2017 00:07:34 -0700 (PDT) Received: from localhost ([::1]:41319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coPVU-0003Vd-LO for importer@patchew.org; Thu, 16 Mar 2017 03:07:32 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1coPSv-00022Q-FS for qemu-devel@nongnu.org; Thu, 16 Mar 2017 03:04:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1coPSu-00062q-G4 for qemu-devel@nongnu.org; Thu, 16 Mar 2017 03:04:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43102) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1coPSu-00062f-BF for qemu-devel@nongnu.org; Thu, 16 Mar 2017 03:04:52 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6345D4E33C; Thu, 16 Mar 2017 07:04:52 +0000 (UTC) Received: from localhost (ovpn-116-32.ams2.redhat.com [10.36.116.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 22CA75DC1D; Thu, 16 Mar 2017 07:04:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6345D4E33C Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=stefanha@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6345D4E33C From: Stefan Hajnoczi To: Date: Thu, 16 Mar 2017 15:04:27 +0800 Message-Id: <20170316070427.17120-4-stefanha@redhat.com> In-Reply-To: <20170316070427.17120-1-stefanha@redhat.com> References: <20170316070427.17120-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Thu, 16 Mar 2017 07:04:52 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 3/3] trace: ensure $(tracetool-y) is defined in top level makefile X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Daniel P. Berrange" The build rules for trace files have a dependancy on $(tracetool-y). This variable populated in the trace/Makefile.objs file and thus its definition gets pulled into the top level makefile. This happens too late in the process though, so by the time $(tracetool-y) is defined, make has already evaluated $(tracetool-y) in the dependancies and found it to be empty. The result is that when the tracetool source is changed, the generated files are not rebuilt. The solution is to define the variable in the top level makefile too Signed-off-by: Daniel P. Berrange Reviewed-by: Eric Blake Tested-by: Eric Blake Message-id: 20170315123421.28815-1-berrange@redhat.com Signed-off-by: Stefan Hajnoczi --- Makefile | 3 +++ trace/Makefile.objs | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 6291764..108b984 100644 --- a/Makefile +++ b/Makefile @@ -86,6 +86,9 @@ GENERATED_FILES +=3D $(BUILD_DIR)/trace-events-all =20 trace-group-name =3D $(shell dirname $1 | sed -e 's/[^a-zA-Z0-9]/_/g') =20 +tracetool-y =3D $(SRC_PATH)/scripts/tracetool.py +tracetool-y +=3D $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py") + %/trace.h: %/trace.h-timestamp @cmp $< $@ >/dev/null 2>&1 || cp $< $@ %/trace.h-timestamp: $(SRC_PATH)/%/trace-events $(tracetool-y) diff --git a/trace/Makefile.objs b/trace/Makefile.objs index 7de840a..1b8eb4a 100644 --- a/trace/Makefile.objs +++ b/trace/Makefile.objs @@ -1,13 +1,5 @@ # -*- mode: makefile -*- =20 -###################################################################### -# tracetool source files -# Every rule that invokes tracetool must depend on this so code is regener= ated -# if tracetool itself changes. - -tracetool-y =3D $(SRC_PATH)/scripts/tracetool.py -tracetool-y +=3D $(shell find $(SRC_PATH)/scripts/tracetool -name "*.py") - $(BUILD_DIR)/trace-events-all: $(trace-events-files) $(call quiet-command,cat $^ > $@) =20 --=20 2.9.3