summaryrefslogtreecommitdiff
path: root/doc/reference/finch/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'doc/reference/finch/meson.build')
-rw-r--r--doc/reference/finch/meson.build65
1 files changed, 29 insertions, 36 deletions
diff --git a/doc/reference/finch/meson.build b/doc/reference/finch/meson.build
index f97c2afbed..baa6a06d92 100644
--- a/doc/reference/finch/meson.build
+++ b/doc/reference/finch/meson.build
@@ -1,39 +1,32 @@
-DOC_MODULE = 'finch'
+finch_doc_content_files = []
-# Header files or dirs to ignore when scanning. Use base file/dir names
-ignore_hfiles = [
- 'plugins',
-]
+if get_option('doc')
+ finch_toml = configure_file(
+ input : 'finch.toml.in',
+ output : 'finch.toml',
+ configuration : version_conf,
+ install : true,
+ install_dir : docs_dir / 'finch',
+ )
-# Extra options to supply to gtkdoc-scan.
-scan_args = [
- '--deprecated-guards=PURPLE_DISABLE_DEPRECATED|GNT_DISABLE_DEPRECATED|FINCH_DISABLE_DEPRECATED',
- '--rebuild-types',
- '--rebuild-sections',
- '--ignore-headers=' + ' '.join(ignore_hfiles),
-]
+ finch_doc = custom_target('finch-doc',
+ input : [ finch_toml, libfinch_gir ],
+ output : 'finch',
+ command : [
+ gidocgen,
+ 'generate',
+ '--quiet',
+ '--fatal-warnings',
+ '--config=@INPUT0@',
+ '--output-dir=@OUTPUT@',
+ '--no-namespace-dir',
+ '--content-dir=@0@'.format(meson.current_source_dir()),
+ '@INPUT1@'
+ ],
+ depend_files : [ finch_doc_content_files ],
+ build_by_default : true,
+ install : true,
+ install_dir : docs_dir,
+ )
+endif
-# Extra options to supply to gtkdoc-mkdb.
-mkdb_args = [
- '--ignore-files=' + ' '.join(ignore_hfiles),
-]
-
-# Extra options to supply to fixxrefs
-fixxref_args = [
- '--extra-dir=../libpurple',
-]
-
-configure_file(
- input : 'version.xml.in',
- output : 'version.xml',
- configuration : version_conf)
-
-finch_doc = gnome.gtkdoc(DOC_MODULE,
- main_xml : DOC_MODULE + '-docs.xml',
- src_dir : libfinch_inc,
- dependencies : libfinch_dep,
- install : true,
- scan_args : scan_args,
- mkdb_args : mkdb_args,
- fixxref_args : fixxref_args,
- gobject_typesfile : DOC_MODULE + '.types')