[mutter/wip/nielsdg/reenable-gtk-doc: 1/2] docs: Re-enable generating the reference manual



commit d1ae48b4e329ad6b1b072b5a8222b45b66275a23
Author: Niels De Graef <nielsdegraef gmail com>
Date:   Thu Jan 17 09:29:00 2019 +0100

    docs: Re-enable generating the reference manual

 doc/meson.build               | 20 ++++++++++++++++
 doc/mutter-docs.sgml          | 53 +++++++++++++++++++++++++++++++++++++++++++
 doc/mutter.types              |  1 +
 doc/version.xml.in            |  1 +
 doc/xml/gtkdocentities.ent.in |  7 ++++++
 doc/xml/meson.build           | 13 +++++++++++
 meson.build                   |  2 +-
 7 files changed, 96 insertions(+), 1 deletion(-)
---
diff --git a/doc/meson.build b/doc/meson.build
new file mode 100644
index 000000000..5cb4499d5
--- /dev/null
+++ b/doc/meson.build
@@ -0,0 +1,20 @@
+subdir('man')
+subdir('xml')
+
+# Reference manual
+version_conf = configuration_data()
+version_conf.set('VERSION', meson.project_version())
+version_xml = configure_file(
+  input: 'version.xml.in',
+  output: 'version.xml',
+  configuration: version_conf
+)
+
+gnome.gtkdoc(meson.project_name(),
+  main_sgml: 'mutter-docs.sgml',
+  # gobject_typesfile: 'mutter.types',
+  # scan_args: '--rebuild-types',
+  # c_args: mutter_c_args,
+  dependencies: [libmutter_dep, mutter_deps ],
+  src_dir: include_directories('../src'),
+)
diff --git a/doc/mutter-docs.sgml b/doc/mutter-docs.sgml
new file mode 100644
index 000000000..a716ceb3d
--- /dev/null
+++ b/doc/mutter-docs.sgml
@@ -0,0 +1,53 @@
+<?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'">
+  <!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
+  %gtkdocentities;
+]>
+<book id="index">
+  <bookinfo>
+    <title>Mutter Reference Manual</title>
+    <releaseinfo>
+      For &package_string;.
+      The latest version of this documentation can be found on-line at
+      <ulink role="online-location" 
url="http://[SERVER]/&package_name;/index.html";>http://[SERVER]/&package_name;/</ulink>.
+    </releaseinfo>
+  </bookinfo>
+
+  <chapter>
+    <title>General</title>
+    <xi:include href="xml/meta-backend.xml"/>
+    <xi:include href="xml/meta-renderer.xml"/>
+    <xi:include href="xml/meta-stage.xml"/>
+    <xi:include href="xml/meta-cursor-tracker.xml"/>
+    <xi:include href="xml/meta-monitor.xml"/>
+    <xi:include href="xml/meta-logical-monitor.xml"/>
+  </chapter>
+
+  <chapter>
+    <title>X11</title>
+    <xi:include href="xml/meta-backend-x11.xml"/>
+  </chapter>
+
+  <chapter>
+    <title>Native / Wayland</title>
+    <xi:include href="xml/meta-backend-native.xml"/>
+    <xi:include href="xml/meta-renderer-native.xml"/>
+  </chapter>
+
+  <!-- <chapter id="object-tree"> -->
+  <!--   <title>Object Hierarchy</title> -->
+  <!--   <xi:include href="xml/tree_index.sgml"/> -->
+  <!-- </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>
diff --git a/doc/mutter.types b/doc/mutter.types
new file mode 100644
index 000000000..25960956f
--- /dev/null
+++ b/doc/mutter.types
@@ -0,0 +1 @@
+meta_backend_get_type
diff --git a/doc/version.xml.in b/doc/version.xml.in
new file mode 100644
index 000000000..d78bda934
--- /dev/null
+++ b/doc/version.xml.in
@@ -0,0 +1 @@
+@VERSION@
diff --git a/doc/xml/gtkdocentities.ent.in b/doc/xml/gtkdocentities.ent.in
new file mode 100644
index 000000000..d2a068a17
--- /dev/null
+++ b/doc/xml/gtkdocentities.ent.in
@@ -0,0 +1,7 @@
+<!ENTITY package @PACKAGE@>
+<!ENTITY package_bugreport @PACKAGE_BUGREPORT@>
+<!ENTITY package_name @PACKAGE_NAME@>
+<!ENTITY package_string @PACKAGE_STRING@>
+<!ENTITY package_tarname @PACKAGE_TARNAME@>
+<!ENTITY package_url @PACKAGE_URL@>
+<!ENTITY package_version @PACKAGE_VERSION@>
diff --git a/doc/xml/meson.build b/doc/xml/meson.build
new file mode 100644
index 000000000..c8e4b8d51
--- /dev/null
+++ b/doc/xml/meson.build
@@ -0,0 +1,13 @@
+gtkdoc_entities_cdata = configuration_data()
+gtkdoc_entities_cdata.set_quoted('PACKAGE', meson.project_name())
+gtkdoc_entities_cdata.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/mutter/issues/new')
+gtkdoc_entities_cdata.set_quoted('PACKAGE_NAME', meson.project_name())
+gtkdoc_entities_cdata.set_quoted('PACKAGE_STRING', '@0@ - @1@'.format(meson.project_name(), 
meson.project_version()))
+gtkdoc_entities_cdata.set_quoted('PACKAGE_TARNAME', 'mutter.tar.xz')
+gtkdoc_entities_cdata.set_quoted('PACKAGE_URL', 'https://gitlab.gnome.org/GNOME/mutter/')
+gtkdoc_entities_cdata.set_quoted('PACKAGE_VERSION', meson.project_version())
+configure_file(
+  input: 'gtkdocentities.ent.in',
+  output: 'gtkdocentities.ent',
+  configuration: gtkdoc_entities_cdata,
+)
diff --git a/meson.build b/meson.build
index 8d8f4da7b..5ef95d2e9 100644
--- a/meson.build
+++ b/meson.build
@@ -328,7 +328,7 @@ subdir('clutter')
 subdir('data')
 subdir('src')
 subdir('po')
-subdir('doc/man')
+subdir('doc')
 
 output = [
   '',


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