From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>, Avi Kivity <avi@redhat.com>
Subject: [Qemu-devel] [PATCH 2/4] docs: add build infrastructure for gtkdocs
Date: Wed, 14 Dec 2011 10:20:35 -0600 [thread overview]
Message-ID: <1323879637-16901-3-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1323879637-16901-1-git-send-email-aliguori@us.ibm.com>
By convention, documented headers now go in include/
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
---
Makefile | 6 +++++-
Makefile.docs | 15 +++++++++++++++
QEMU-docs.xml | 31 +++++++++++++++++++++++++++++++
3 files changed, 51 insertions(+), 1 deletions(-)
create mode 100644 Makefile.docs
create mode 100644 QEMU-docs.xml
diff --git a/Makefile b/Makefile
index 2c03055..d7974af 100644
--- a/Makefile
+++ b/Makefile
@@ -92,6 +92,8 @@ ifneq ($(wildcard config-host.mak),)
include $(SRC_PATH)/Makefile.objs
endif
+include $(SRC_PATH)/Makefile.docs
+
$(common-obj-y): $(GENERATED_HEADERS)
subdir-libcacard: $(oslib-obj-y) $(trace-obj-y) qemu-timer-common.o
@@ -113,6 +115,8 @@ QEMU_CFLAGS+=$(CURL_CFLAGS)
QEMU_CFLAGS+=$(GLIB_CFLAGS)
+QEMU_CFLAGS+=$(SRC_PATH)/include
+
ui/cocoa.o: ui/cocoa.m
ui/sdl.o audio/sdlaudio.o ui/sdl_zoom.o baum.o: QEMU_CFLAGS += $(SDL_CFLAGS)
@@ -220,7 +224,7 @@ qemu-ga$(EXESUF): qemu-ga.o $(qga-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qobject-
QEMULIBS=libhw32 libhw64 libuser libdis libdis-user
-clean:
+clean: gtkdoc-clean
# avoid old build problems by removing potentially incorrect old files
rm -f config.mak op-i386.h opc-i386.h gen-op-i386.h op-arm.h opc-arm.h gen-op-arm.h
rm -f qemu-options.def
diff --git a/Makefile.docs b/Makefile.docs
new file mode 100644
index 0000000..bea0833
--- /dev/null
+++ b/Makefile.docs
@@ -0,0 +1,15 @@
+DOC_SRC=$(wildcard $(SRC_PATH)/include/*.h)
+
+gtkdoc: html/index.html
+
+html/index.html: $(DOC_SRC)
+ gtkdoc-scan --module=QEMU --source-dir=$(SRC_PATH)/include && \
+ cp $(SRC_PATH)/QEMU-docs.xml . && \
+ gtkdoc-mkdb --module=QEMU --output-format=xml --source-dir=$(SRC_PATH)/include && \
+ mkdir -p html && \
+ (cd html && gtkdoc-mkhtml QEMU ../QEMU-docs.xml && cd ..) && \
+ gtkdoc-fixxref --module=QEMU --module-dir=html
+
+gtkdoc-clean:
+ $(RM) -r html xml
+ $(RM) $(SCAN_GEN) sgml.stamp *.bak html.stamp
diff --git a/QEMU-docs.xml b/QEMU-docs.xml
new file mode 100644
index 0000000..ddc827a
--- /dev/null
+++ b/QEMU-docs.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
+ "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
+[
+ <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
+]>
+<book id="index">
+ <bookinfo>
+ <title>QEMU Reference Manual</title>
+ <releaseinfo>
+ for QEMU 1.0.
+ The latest version of this documentation can be found on-line at
+ <ulink role="online-location" url="http://wiki.qemu.org/docs-internal/">http://wiki.qemu.org/docs-internal/</ulink>.
+ </releaseinfo>
+ </bookinfo>
+
+ <chapter>
+ <title>Core Device APIs</title>
+
+ </chapter>
+ <index id="api-index-full">
+ <title>API Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+ </index>
+ <index id="deprecated-api-index" role="deprecated">
+ <title>Index of deprecated API</title>
+ <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
+ </index>
+
+ <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
--
1.7.4.1
next prev parent reply other threads:[~2011-12-14 16:20 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 16:20 [Qemu-devel] [PATCH 0/4] GTK-DOC build integration Anthony Liguori
2011-12-14 16:20 ` [Qemu-devel] [PATCH 1/4] memory: make memory API parsable by gtkdoc-scan Anthony Liguori
2011-12-14 16:34 ` malc
2011-12-14 16:55 ` Anthony Liguori
2011-12-14 17:11 ` Peter Maydell
2011-12-14 17:19 ` Anthony Liguori
2011-12-14 17:26 ` Peter Maydell
2011-12-14 18:00 ` Anthony Liguori
2011-12-14 17:55 ` Stefan Weil
2011-12-15 9:20 ` Avi Kivity
2011-12-15 13:35 ` Anthony Liguori
2011-12-14 18:54 ` Stefan Weil
2011-12-14 19:03 ` Anthony Liguori
2011-12-14 20:48 ` Stefan Weil
2011-12-14 20:54 ` Anthony Liguori
2011-12-14 21:26 ` Stefan Weil
2011-12-14 21:51 ` Anthony Liguori
2011-12-14 22:23 ` Stefan Weil
2011-12-14 22:37 ` Anthony Liguori
2011-12-14 20:23 ` Eric Blake
2011-12-14 20:43 ` malc
2011-12-14 20:49 ` Anthony Liguori
2011-12-14 16:20 ` Anthony Liguori [this message]
2011-12-15 9:37 ` [Qemu-devel] [PATCH 2/4] docs: add build infrastructure for gtkdocs Avi Kivity
2011-12-15 10:06 ` Stefan Weil
2011-12-15 13:30 ` Anthony Liguori
2011-12-15 13:43 ` Avi Kivity
2011-12-15 14:10 ` Anthony Liguori
2011-12-16 5:01 ` Andreas Färber
2011-12-14 16:20 ` [Qemu-devel] [PATCH 3/4] memory: update documentation to be in gtk-doc format Anthony Liguori
2011-12-15 9:26 ` Avi Kivity
2011-12-15 13:33 ` Anthony Liguori
2011-12-15 13:44 ` Avi Kivity
2011-12-14 16:20 ` [Qemu-devel] [PATCH 4/4] memory: move header into include/ and add to QEMU docs Anthony Liguori
2011-12-15 9:24 ` Avi Kivity
2011-12-15 13:34 ` Anthony Liguori
2011-12-15 13:45 ` Avi Kivity
2011-12-15 14:12 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1323879637-16901-3-git-send-email-aliguori@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=avi@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).