From patchwork Tue Jun 5 01:00:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Roth X-Patchwork-Id: 162905 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id D6F3FB6F9D for ; Tue, 5 Jun 2012 11:44:49 +1000 (EST) Received: from localhost ([::1]:48044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbi9i-0003T0-St for incoming@patchwork.ozlabs.org; Mon, 04 Jun 2012 21:01:54 -0400 Received: from eggs.gnu.org ([208.118.235.92]:48462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbi8t-0001xJ-N5 for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sbi8r-0002vl-Nm for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:01:03 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:34174) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sbi8r-0002oi-EZ for qemu-devel@nongnu.org; Mon, 04 Jun 2012 21:01:01 -0400 Received: by mail-pz0-f45.google.com with SMTP id v2so7118187dad.4 for ; Mon, 04 Jun 2012 18:01:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=grcGzB/oMEy32WRaLp0vmMFOYv8NgD38hWTrZVRzBcw=; b=JpjKuugWwVOuFUQpp52aevdRhajkj0rbeJP3HOZIfRcf16f/LkKdGbuXeHrxYrSqi7 pTNJ0aZgoFfVfBShwWh7VVrAPMelBbwuQVcn0nkgWWEMVCemsq31ycyqMK9AobS3ZAB2 jHr6JGOBmf7xuy7Cv35oneN/IvLnddxfHgBZUozq9yNK+VfN9k0FEEj7kQnuCA9GE8Me /7uHY1Ll3gfk/3/I2EmfOEpvYuA6Wz+7MTzLIUm346cOQZrD722KMU4NSyNmsG8KWW9o /pIUt4DvvhF5kzuqyTbkXvLmAZ6xsev1FW/2taLc2ZkhrNPWFhFMJFPtv4GRUBADTbl+ 8Xog== Received: by 10.68.217.233 with SMTP id pb9mr28159338pbc.121.1338858060523; Mon, 04 Jun 2012 18:01:00 -0700 (PDT) Received: from localhost.localdomain ([32.97.110.59]) by mx.google.com with ESMTPS id np8sm408059pbc.71.2012.06.04.18.00.58 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 04 Jun 2012 18:01:00 -0700 (PDT) From: Michael Roth To: qemu-devel@nongnu.org Date: Mon, 4 Jun 2012 20:00:16 -0500 Message-Id: <1338858018-17189-16-git-send-email-mdroth@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1338858018-17189-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1338858018-17189-1-git-send-email-mdroth@linux.vnet.ibm.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.210.45 Cc: aliguori@us.ibm.com, quintela@redhat.com, owasserm@redhat.com, yamahata@valinux.co.jp, pbonzini@redhat.com, akong@redhat.com, afaerber@suse.de Subject: [Qemu-devel] [PATCH 15/17] Makefile: add qidl-generation of vmstate field descriptions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org This will rebuild the vmstate descriptions in $(SRC_DIR)/qidl-generated whenever we do a build where one of the annotated sources has been modified. As a result, changes will be reflected in the working tree so we can detect changes and commit them in cases where the changes are correct/expected. Signed-off-by: Michael Roth --- Makefile.target | 17 +++++++++++++++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile.target b/Makefile.target index 45e4459..0844401 100644 --- a/Makefile.target +++ b/Makefile.target @@ -22,7 +22,7 @@ QEMU_CFLAGS += -I.. -I$(TARGET_PATH) -DNEED_CPU_H qidl-dir := $(SRC_PATH)/qidl-generated qapi-dir := $(BUILD_DIR)/qapi-generated -QEMU_CFLAGS += -I$(qapi-dir) +QEMU_CFLAGS += -I$(qapi-dir) -I$(qidl-dir) include $(SRC_PATH)/Makefile.objs @@ -74,7 +74,7 @@ else stap: endif -all: $(PROGS) stap +all: $(PROGS) stap $(QIDL_VMSTATE) # Dummy command so that make thinks it has done something @true @@ -109,6 +109,19 @@ $(QIDL_DEVICE_VISITORS): $(QIDL_DEVICE_VISITOR_SOURCES) $(QIDL_DEVICES): $(QIDL_DEVICE_VISITORS) ######################################################### +# QIDL-generated vmstate field descriptions +QIDL_SOURCES_VMSTATE_SHORT=hw/mc146818rtc_state.h +QIDL_SOURCES_VMSTATE=$(addprefix $(SRC_PATH)/, $(QIDL_SOURCES_VMSTATE_SHORT)) +QIDL_VMSTATE=$(patsubst %.h,$(qidl-dir)/%_vmstate.h, $(subst _state,, $(notdir $(QIDL_SOURCES_VMSTATE)))) + +$(QIDL_VMSTATE) qidl-vmstate: $(QIDL_SOURCES_VMSTATE) + mkdir -p $(qidl-dir) + for f in $(QIDL_SOURCES_VMSTATE); do \ + vmstate_filename=$(qidl-dir)/`basename $$(basename $$f .h) _state`_vmstate.h; \ + $(PYTHON) $(SRC_PATH)/scripts/qc.py --vmstate < $$f >$$vmstate_filename; \ + done + +######################################################### # cpu emulator library libobj-y = exec.o translate-all.o cpu-exec.o translate.o libobj-y += tcg/tcg.o tcg/optimize.o