[tracker/wip/carlosg/gi-docgen: 24/26] docs: Generate base ontology documentation for gi-docgen docs




commit 7f3984285c5ab06a1282867f7e0719750770ee51
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sun Jun 6 23:45:23 2021 +0200

    docs: Generate base ontology documentation for gi-docgen docs

 docs/reference/libtracker-sparql/meson.build       | 25 ++++++++++++++++++++--
 .../libtracker-sparql/tracker-sparql.toml.in       |  5 +++++
 docs/reference/meson.build                         |  1 +
 docs/reference/ontology/meson.build                |  1 +
 4 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/libtracker-sparql/meson.build b/docs/reference/libtracker-sparql/meson.build
index f31a70172..a492accfd 100644
--- a/docs/reference/libtracker-sparql/meson.build
+++ b/docs/reference/libtracker-sparql/meson.build
@@ -1,3 +1,14 @@
+base_ontology_docs = custom_target('ontology-docgen',
+    output: ['dc-ontology.md'],
+    command: [tracker_docgen,
+              '--md',
+              '-d', join_paths(source_root, 'src/ontologies/'),
+              '-o', join_paths(meson.current_build_dir())],
+    depends: tracker_docgen,
+    depend_files: [base_ontology],
+    build_by_default: true,
+)
+
 content = [
   'overview.md',
   'ontologies.md',
@@ -10,9 +21,17 @@ content = [
   'tutorial.md',
 ]
 
+generated_content = [
+  'xsd-ontology.md',
+  'dc-ontology.md',
+  'rdf-ontology.md',
+  'rdfs-ontology.md',
+  'nrl-ontology.md',
+]
+
 # The TOML gi-docgen configuration wants a list of quoted file names.
 _quoted = []
-foreach c : content
+foreach c : content + generated_content
   _quoted += '"@0@"'.format(c)
 endforeach
 
@@ -34,8 +53,10 @@ custom_target(
     '--output-dir=@OUTPUT@',
     #'--no-namespace-dir',
     '--content-dir=@0@'.format(meson.current_source_dir()),
+    '--content-dir=@0@'.format(meson.current_build_dir()),
+    '--content-dir=@0@'.format(icon_images_base),
     '@INPUT1@',
   ],
-  depends: tracker_sparql_gir[0],
+  depends: [tracker_sparql_gir[0], base_ontology_docs],
   depend_files: [ content ],
   build_by_default: true)
diff --git a/docs/reference/libtracker-sparql/tracker-sparql.toml.in 
b/docs/reference/libtracker-sparql/tracker-sparql.toml.in
index 80172e14c..feaa736be 100644
--- a/docs/reference/libtracker-sparql/tracker-sparql.toml.in
+++ b/docs/reference/libtracker-sparql/tracker-sparql.toml.in
@@ -29,6 +29,11 @@ content_files = [
     @content@
 ]
 content_images = [
+    "images/icon-deprecated.svg",
+    "images/icon-fulltextindexed.svg",
+    "images/icon-multivalue.svg",
+    "images/icon-notify.svg",
+    "images/icon-superproperty.svg",
     "images/triple-graph-1.png",
     "images/triple-graph-2.png",
     "images/triple-graph-3.png",
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index b279c6ee9..0c76203fa 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -1,5 +1,6 @@
 docpath = join_paths(datadir, 'gtk-doc')
 
+icon_images_base = meson.current_source_dir()
 icon_images = files(
   'images/icon-deprecated.svg',
   'images/icon-fulltextindexed.svg',
diff --git a/docs/reference/ontology/meson.build b/docs/reference/ontology/meson.build
index 5f3c87ac5..1799d46da 100644
--- a/docs/reference/ontology/meson.build
+++ b/docs/reference/ontology/meson.build
@@ -19,4 +19,5 @@ gnome.gtkdoc('ontology',
     main_xml: 'ontology-docs.xml',
     html_assets: icon_images,
     module_version: tracker_api_major,
+    depends: [generated],
     install: true)


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