[gtk-doc] mkdb: Also include index files when creating a default master
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] mkdb: Also include index files when creating a default master
- Date: Fri, 4 Aug 2017 15:33:58 +0000 (UTC)
commit 7579c58cd091732d41d3229f7f52e0aa49df9cba
Author: Stefan Sauer <ensonic users sf net>
Date: Fri Aug 4 17:32:17 2017 +0200
mkdb: Also include index files when creating a default master
This is probably rarely needed, since a new project won't have since docs.
gtkdoc/mkdb.py | 10 ++++++++++
tests/empty/src/tester.h | 7 +++++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc/mkdb.py b/gtkdoc/mkdb.py
index 964a975..e892a3b 100644
--- a/gtkdoc/mkdb.py
+++ b/gtkdoc/mkdb.py
@@ -2441,6 +2441,8 @@ def OutputBook(main_file, book_top, book_bottom):
if main_file and not os.path.exists(main_file):
OUTPUT = open(main_file, 'w')
+ logging.info("no master doc, create default one at: " + main_file)
+
OUTPUT.write('''%s
<book id="index">
<bookinfo>
@@ -2481,6 +2483,14 @@ def OutputBook(main_file, book_top, book_bottom):
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
</index>
''')
+ for version in set(Since.values()):
+ dash_version = version.replace('.', '-')
+ OUTPUT.write(''' <index id="api-index-%s" role="%s">
+ <title>Index of new API in %s</title>
+ <xi:include href="xml/api-index-%s.xml"><xi:fallback /></xi:include>
+ </index>
+''' % (dash_version, version, version, version))
+
if AnnotationsUsed:
OUTPUT.write(''' <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
''')
diff --git a/tests/empty/src/tester.h b/tests/empty/src/tester.h
index 23ab4ea..ed2ade6 100644
--- a/tests/empty/src/tester.h
+++ b/tests/empty/src/tester.h
@@ -4,6 +4,13 @@
#include <glib.h>
#include <glib-object.h>
+/**
+ * FOO:
+ * The FOO.
+ *
+ * Since: 0.1
+ */
+#define FOO "bar"
void test (gint a);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]