[gssdp/wip/phako/gi-docgen] wip: Use gi-docgen for the documentation
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gssdp/wip/phako/gi-docgen] wip: Use gi-docgen for the documentation
- Date: Thu, 13 May 2021 21:07:19 +0000 (UTC)
commit b87010e9de450ca50eb060f8331814669c15928c
Author: Jens Georg <mail jensge org>
Date: Thu May 13 23:06:17 2021 +0200
wip: Use gi-docgen for the documentation
doc/meson.build | 57 +++++++++++++++++++++++++++++++++++-----------
meson.build | 6 +++++
subprojects/gi-docgen.wrap | 7 ++++++
3 files changed, 57 insertions(+), 13 deletions(-)
---
diff --git a/doc/meson.build b/doc/meson.build
index 383417e..b75b8ab 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -4,16 +4,47 @@ configure_file(input: 'version.xml.in',
output: 'version.xml', configuration:
entities)
-gnome.gtkdoc('gssdp',
- main_xml : 'gssdp-docs.xml',
- gobject_typesfile : 'gssdp.types',
- dependencies : [gssdp, dependencies],
- src_dir : ['libgssdp'],
- ignore_headers : [
- 'gssdp-socket-source.h',
- 'gssdp-client-private.h',
- 'gssdp-protocol.h',
- 'gssdp-pktinfo-message.h',
- 'gssdp-net.h'
- ],
- install : true)
+gidocgen = find_program('gi-docgen', required: true)
+
+gssdp_toml = configure_file (
+ input: 'gssdp.toml.in',
+ output: 'gssdp.toml',
+ configuration: entities
+)
+
+docs_dir = join_paths(get_option('prefix'), get_option('datadir')) / 'doc/gssdp-1.2/reference'
+
+custom_target(
+ 'gssdp-doc',
+ input: gir[0],
+ output: 'GSSDP',
+ command : [
+ gidocgen,
+ 'generate',
+ '--quiet',
+ '--add-include-path=@0@'.format(meson.current_build_dir() / '../libgssdp'),
+ '--config', gssdp_toml,
+ '--output-dir=@OUTPUT@',
+ '--no-namespace-dir',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT@',
+ ],
+ depend_files : gssdp_toml,
+ build_by_default: true,
+ install: true,
+ install_dir : docs_dir,
+)
+
+#gnome.gtkdoc('gssdp',
+# main_xml : 'gssdp-docs.xml',
+# gobject_typesfile : 'gssdp.types',
+# dependencies : [gssdp, dependencies],
+# src_dir : ['libgssdp'],
+# ignore_headers : [
+# 'gssdp-socket-source.h',
+# 'gssdp-client-private.h',
+# 'gssdp-protocol.h',
+# 'gssdp-pktinfo-message.h',
+# 'gssdp-net.h'
+# ],
+#install : true)
diff --git a/meson.build b/meson.build
index 5bc78af..c3ff9ee 100644
--- a/meson.build
+++ b/meson.build
@@ -80,6 +80,12 @@ if get_option('vapi') and get_option('introspection')
subdir('vala')
endif
+
+gidocgen_dep = dependency('gi-docgen', version: '>= 2021.1',
+ fallback: ['gi-docgen', 'dummy_dep'],
+ required: get_option('gtk_doc') and get_option('introspection')
+ )
+
if get_option('gtk_doc')
subdir('doc')
endif
diff --git a/subprojects/gi-docgen.wrap b/subprojects/gi-docgen.wrap
new file mode 100644
index 0000000..fb001c2
--- /dev/null
+++ b/subprojects/gi-docgen.wrap
@@ -0,0 +1,7 @@
+[wrap-git]
+directory=gi-docgen
+url=https://gitlab.gnome.org/GNOME/gi-docgen.git
+push-url=ssh://git gitlab gnome org:GNOME/gi-docgen.git
+revision=main
+depth=1
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]