[tracker/wip/carlosg/hotdoc: 28/40] build: Use hotdoc to build documentation
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/hotdoc: 28/40] build: Use hotdoc to build documentation
- Date: Thu, 5 Aug 2021 14:51:35 +0000 (UTC)
commit e63e00ee63d6e43e9523699b70dd05ab2cce1bf4
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Aug 3 11:58:19 2021 +0200
build: Use hotdoc to build documentation
docs/meson.build | 1 +
docs/reference/libtracker-sparql/meson.build | 55 ++++++++++------------
docs/reference/libtracker-sparql/sitemap.txt | 18 +++++++
.../libtracker-sparql/tracker-sparql.toml.in | 41 ----------------
meson.build | 5 --
src/libtracker-sparql/meson.build | 6 ++-
6 files changed, 50 insertions(+), 76 deletions(-)
---
diff --git a/docs/meson.build b/docs/meson.build
index e43b12a8b..a57c8eb04 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -2,6 +2,7 @@ if get_option('man')
subdir('manpages')
endif
if get_option('docs')
+ hotdoc = import('hotdoc')
subdir('tools')
subdir('reference')
endif
diff --git a/docs/reference/libtracker-sparql/meson.build b/docs/reference/libtracker-sparql/meson.build
index 14321c810..d616dc1f2 100644
--- a/docs/reference/libtracker-sparql/meson.build
+++ b/docs/reference/libtracker-sparql/meson.build
@@ -48,34 +48,31 @@ generated_content = [
'nrl-ontology.md',
]
-# The TOML gi-docgen configuration wants a list of quoted file names.
-_quoted = []
-foreach c : content + generated_content
- _quoted += '"@0@"'.format(c)
-endforeach
+required_hotdoc_extensions = [
+ 'gi-extension',
+ 'devhelp-extension',
+ 'syntax-highlighting-extension',
+]
-gidocgen_conf = configuration_data()
-gidocgen_conf.set('version', meson.project_version())
-gidocgen_conf.set('content', ','.join(_quoted))
-gidocgen_toml = configure_file(input: 'tracker-sparql.toml.in', output: 'tracker-sparql.toml',
configuration: gidocgen_conf)
+foreach ext: required_hotdoc_extensions
+ if not hotdoc.has_extensions(ext)
+ error('Documentation enabled but HotDoc extension "@0@" is missing'.format(ext))
+ endif
+endforeach
-custom_target(
- 'docgen',
- input: [ gidocgen_toml, tracker_sparql_gir[0] ],
- output: 'docs',
- command: [
- gidocgen,
- 'generate',
- '--quiet',
- #'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
- '--config=@INPUT0@',
- '--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], base_ontology_docs, examples],
- depend_files: [ content ],
- build_by_default: true)
+hotdoc.generate_doc('tracker',
+ project_version: tracker_version,
+ languages: [ 'c', 'python', 'javascript' ],
+ gi_c_sources: [libtracker_sparql_c_sources, libtracker_sparql_c_public_headers,
libtracker_sparql_remote_c_sources],
+ gi_sources: [tracker_sparql_gir[0].full_path()],
+ sitemap: 'sitemap.txt',
+ index: 'index.md',
+ gi_index: 'gi-index.md',
+ gi_smart_index: true,
+ gi_c_source_roots: [sparqlinc],
+ dependencies: [tracker_sparql_dep, glib, gobject],
+ extra_assets: [join_paths(meson.current_source_dir(), 'images')],
+ syntax_highlighting_activate: true,
+ devhelp_activate: true,
+ install: true,
+)
diff --git a/docs/reference/libtracker-sparql/sitemap.txt b/docs/reference/libtracker-sparql/sitemap.txt
new file mode 100644
index 000000000..3cdf7fdd6
--- /dev/null
+++ b/docs/reference/libtracker-sparql/sitemap.txt
@@ -0,0 +1,18 @@
+index.md
+ overview.md
+ examples.md
+ tutorial.md
+ ontologies.md
+ base-ontology.md
+ xsd-ontology.md
+ dc-ontology.md
+ rdf-ontology.md
+ rdfs-ontology.md
+ nrl-ontology.md
+ defining-ontologies.md
+ gi-index
+ sparql-functions.md
+ implementation.md
+ limits.md
+ performance.md
+ sparql-and-tracker.md
diff --git a/meson.build b/meson.build
index 1d5dc69cb..ebd943a27 100644
--- a/meson.build
+++ b/meson.build
@@ -74,11 +74,6 @@ endif
gidocgen = dependency('gi-docgen', version: '>= 2021.1', fallback: ['gi-docgen', 'dummy_dep'])
gidocgen = find_program('gi-docgen')
-if get_option('soup2')
- libsoup = dependency('libsoup-2.4', version: '> 2.40', required: true)
-else
- libsoup = dependency('libsoup-3.0', version: '>= 2.99.2', required: true)
-
if get_option('man')
asciidoc = find_program('asciidoc')
xsltproc = find_program('xsltproc')
diff --git a/src/libtracker-sparql/meson.build b/src/libtracker-sparql/meson.build
index f4365d7f3..02a60b92e 100644
--- a/src/libtracker-sparql/meson.build
+++ b/src/libtracker-sparql/meson.build
@@ -90,8 +90,12 @@ subdir('direct')
tracker_remote_dependencies = [json_glib, libxml2]
-remote_sources = [
+libtracker_sparql_remote_c_sources = files (
'tracker-endpoint-http.c',
+)
+
+remote_sources = [
+ libtracker_sparql_remote_c_sources,
'remote/tracker-json-cursor.vala',
'remote/tracker-xml-cursor.vala',
'remote/tracker-remote.vala',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]