[gtk-doc] mkdb: improve initial doc generation



commit 27f8849eb92725779767bceba4b19c0c1c99e153
Author: Stefan Sauer <ensonic users sf net>
Date:   Fri Apr 24 21:28:29 2015 +0200

    mkdb: improve initial doc generation
    
    During first run, gnerate optional parts as comments to make it easier for
    people to enable them as needed. Don't generate the annotations if not used to
    silence a warning in the tests.

 gtkdoc-mkdb.in |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in
index 710e288..1ee6e57 100755
--- a/gtkdoc-mkdb.in
+++ b/gtkdoc-mkdb.in
@@ -2704,9 +2704,18 @@ EOF
     print OUTPUT <<EOF;
   <chapter id="object-tree">
     <title>Object Hierarchy</title>
-     <xi:include href="xml/tree_index.sgml"/>
+    <xi:include href="xml/tree_index.sgml"/>
   </chapter>
 EOF
+  } else {
+    print OUTPUT <<EOF;
+  <!-- enable this when you use gobject types
+  <chapter id="object-tree">
+    <title>Object Hierarchy</title>
+    <xi:include href="xml/tree_index.sgml"/>
+  </chapter>
+  -->
+EOF
   }
 
 print OUTPUT <<EOF;
@@ -2718,8 +2727,19 @@ print OUTPUT <<EOF;
     <title>Index of deprecated API</title>
     <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
   </index>
-
+EOF
+  if (keys(%AnnotationsUsed)) {
+    print OUTPUT <<EOF;
   <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+EOF
+  } else {
+    print OUTPUT <<EOF;
+  <!-- enable this when you use gobject introspection annotations
+  <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+  -->
+EOF
+  }
+  print OUTPUT <<EOF;
 </book>
 EOF
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]