From patchwork Fri Jul 3 09:51:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 490977 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 25A41140777 for ; Fri, 3 Jul 2015 19:53:49 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=Yzs2BfX9; dkim-atps=neutral Received: from localhost ([::1]:40145 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAxfH-0004tw-DZ for incoming@patchwork.ozlabs.org; Fri, 03 Jul 2015 05:53:47 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAxd7-0000ja-2N for qemu-devel@nongnu.org; Fri, 03 Jul 2015 05:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAxd3-0005Ts-Rj for qemu-devel@nongnu.org; Fri, 03 Jul 2015 05:51:33 -0400 Received: from mail-qk0-x233.google.com ([2607:f8b0:400d:c09::233]:32802) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAxd3-0005Tg-Ma for qemu-devel@nongnu.org; Fri, 03 Jul 2015 05:51:29 -0400 Received: by qkhu186 with SMTP id u186so69503059qkh.0 for ; Fri, 03 Jul 2015 02:51:29 -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:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=FPNwLDqheuQP1k5RXej9o2WG92P3vScdtgTstPZnpUs=; b=Yzs2BfX910xiRuWBOL+O/mqxAWcXBMsCq7eRNP5Im46qFTqDIJnbdG14NXzunlu3dj YFX445vc0P3dUL4/yZRBJrckQvpM9AhAhLJU43+utD1YAmx68T1LCEBEnX4RZ381WKew Pm6geDl9YH0/IHskzyhEANHmpjE3S91v8doRZK3BqjcsS6j16trBNaq+UFX59wU00T7b dAGZkgZKBRbnkr7yLXsyhqzPikODW6s21GfLwFVarg5JU/r04ioNdkWqByDdEmIWDiPE sKsknH7IszCChU6frI1shKcjtZl38pdijKdXQ3uLeckxkLBwgWSu4mPmKwrpAOQGY3fA uMpw== X-Received: by 10.140.82.180 with SMTP id h49mr48893611qgd.29.1435917089323; Fri, 03 Jul 2015 02:51:29 -0700 (PDT) Received: from localhost (bne75-h02-31-39-163-232.dsl.sta.abo.bbox.fr. [31.39.163.232]) by mx.google.com with ESMTPSA id d10sm4130875qhc.9.2015.07.03.02.51.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 03 Jul 2015 02:51:28 -0700 (PDT) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Fri, 3 Jul 2015 11:51:04 +0200 Message-Id: <1435917064-17827-6-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1435917064-17827-1-git-send-email-marcandre.lureau@redhat.com> References: <1435917064-17827-1-git-send-email-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c09::233 Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , armbru@redhat.com, mdroth@linux.vnet.ibm.com Subject: [Qemu-devel] [PATCH 5/5] build-sys: generate QAPI doc based on json 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 Learn to generate info/html/pdf/man documentation for QEMU and agent QMP APIs. This allows to provide missing agent documentation, and should help getting rid of the duplicate documentation in qmp-commands.hx. Signed-off-by: Marc-André Lureau --- Makefile | 35 ++++++++++++++++++++++++++++++----- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index c9be643..c176650 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,7 @@ HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF) ifdef BUILD_DOCS DOCS=qemu-doc.html qemu-tech.html qemu.1 qemu-img.1 qemu-nbd.8 qmp-commands.txt +DOCS+=qemu-qapi.7 qemu-ga-qapi.7 ifdef CONFIG_LINUX DOCS+=kvm_stat.1 endif @@ -244,6 +245,7 @@ qemu-ga$(EXESUF): QEMU_CFLAGS += -I qga/qapi-generated gen-out-type = $(subst .,-,$(suffix $@)) qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py +qapi-py += $(SRC_PATH)/scripts/qapi2texi.py qga/qapi-generated/qga-qapi-types.c qga/qapi-generated/qga-qapi-types.h :\ $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-types.py $(qapi-py) @@ -354,7 +356,7 @@ distclean: clean rm -f qemu-doc.vr rm -f config.log rm -f linux-headers/asm - rm -f qemu-tech.info qemu-tech.aux qemu-tech.cp qemu-tech.dvi qemu-tech.fn qemu-tech.info qemu-tech.ky qemu-tech.log qemu-tech.pdf qemu-tech.pg qemu-tech.toc qemu-tech.tp qemu-tech.vr + rm -f qemu-{tech,qapi,ga-qapi}.{info,aux,cp,dvi,fn,info,.ky,log,pdf,pg,toc,tp,vr} for d in $(TARGET_DIRS); do \ rm -rf $$d || exit 1 ; \ done @@ -399,6 +401,7 @@ ifneq ($(TOOLS),) $(INSTALL_DATA) qemu-img.1 "$(DESTDIR)$(mandir)/man1" $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8" $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8" + $(INSTALL_DATA) qemu-qapi.7 qemu-ga-qapi.7 "$(DESTDIR)$(mandir)/man7" endif endif ifdef CONFIG_VIRTFS @@ -514,6 +517,16 @@ qmp-commands.txt: $(SRC_PATH)/qmp-commands.hx qemu-img-cmds.texi: $(SRC_PATH)/qemu-img-cmds.hx $(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -t < $< > $@," GEN $@") +qemu-qapi.texi: $(qapi-modules) $(qapi-py) + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py \ + "QEMU QAPI Reference Manual" $(VERSION) qemu-qapi \ + $< > $@," GEN $@") + +qemu-ga-qapi.texi: $(SRC_PATH)/qga/qapi-schema.json $(qapi-py) + $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi2texi.py \ + "QEMU Guest Agent API Reference Manual" $(VERSION) qemu-ga-qapi \ + $< > $@," GEN $@") + qemu.1: qemu-doc.texi qemu-options.texi qemu-monitor.texi $(call quiet-command, \ perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu.pod && \ @@ -538,16 +551,28 @@ qemu-nbd.8: qemu-nbd.texi $(POD2MAN) --section=8 --center=" " --release=" " qemu-nbd.pod > $@, \ " GEN $@") +qemu-qapi.7: qemu-qapi.texi + $(call quiet-command, \ + perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-qapi.pod && \ + $(POD2MAN) --section=7 --center=" " --release=" " qemu-qapi.pod > $@, \ + " GEN $@") + +qemu-ga-qapi.7: qemu-ga-qapi.texi + $(call quiet-command, \ + perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< qemu-ga-qapi.pod && \ + $(POD2MAN) --section=7 --center=" " --release=" " qemu-ga-qapi.pod > $@, \ + " GEN $@") + kvm_stat.1: scripts/kvm/kvm_stat.texi $(call quiet-command, \ perl -Ww -- $(SRC_PATH)/scripts/texi2pod.pl $< kvm_stat.pod && \ $(POD2MAN) --section=1 --center=" " --release=" " kvm_stat.pod > $@, \ " GEN $@") -dvi: qemu-doc.dvi qemu-tech.dvi -html: qemu-doc.html qemu-tech.html -info: qemu-doc.info qemu-tech.info -pdf: qemu-doc.pdf qemu-tech.pdf +dvi: qemu-doc.dvi qemu-tech.dvi qemu-qapi.dvi +html: qemu-doc.html qemu-tech.html qemu-qapi.html +info: qemu-doc.info qemu-tech.info qemu-qapi.info +pdf: qemu-doc.pdf qemu-tech.pdf qemu-qapi.pdf qemu-doc.dvi qemu-doc.html qemu-doc.info qemu-doc.pdf: \ qemu-img.texi qemu-nbd.texi qemu-options.texi \