summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2017-10-26 10:00:30 -0400
committerPatrick Griffis <tingping@tingping.se>2017-10-26 10:00:30 -0400
commit01f26d46f2fdda7efc00b424258de8fe63939940 (patch)
treebc8ec2135158dc629eb41fc9b1b4b30375141d4a
parentd52497f022dfaa974c3b9452776dd8829aa315b5 (diff)
downloadgobject-introspection-01f26d46f2fdda7efc00b424258de8fe63939940.tar.gz
Build docs
-rw-r--r--docs/meson.build4
-rw-r--r--docs/reference/meson.build41
-rw-r--r--meson_options.txt4
3 files changed, 49 insertions, 0 deletions
diff --git a/docs/meson.build b/docs/meson.build
index 1ffde1f8..cebaad8d 100644
--- a/docs/meson.build
+++ b/docs/meson.build
@@ -1,2 +1,6 @@
install_man('g-ir-compiler.1', 'g-ir-generate.1', 'g-ir-scanner.1')
install_data('gir-1.2.rnc', install_dir: join_paths(get_option('datadir'), 'gir-1.0'))
+
+if get_option('gtk-doc')
+ subdir('reference')
+endif
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
new file mode 100644
index 00000000..b6173116
--- /dev/null
+++ b/docs/reference/meson.build
@@ -0,0 +1,41 @@
+gnome = import('gnome')
+
+version_conf = configuration_data()
+version_conf.set('GI_VERSION', meson.project_version())
+
+version_xml = configure_file(
+ input: 'version.xml.in',
+ output: 'version.xml',
+ configuration: version_conf,
+)
+
+ignore_headers = [
+ 'cmph',
+ 'girnode.h',
+ 'girparser.h',
+ 'girwriter.h',
+ 'girmodule.h',
+ 'girepository-private.h',
+]
+
+gnome.gtkdoc('gi',
+ main_xml: 'gi-docs.xml',
+ dependencies: girepo_dep,
+ src_dir: 'girepository',
+ html_assets: 'images/overview.png',
+ content_files: [
+ 'overview-building.xml',
+ 'overview-programming.xml',
+ 'gi-gir-reference.xml',
+ 'gi-struct-hierarchy.xml',
+ ],
+ scan_args: [
+ '--rebuild-types',
+ '--ignore-headers=' + ' '.join(ignore_headers),
+ ],
+ mkdb_args: [
+ '--name-space=g',
+ '--ignore-files=cmph',
+ ],
+ install: true,
+)
diff --git a/meson_options.txt b/meson_options.txt
index 3d113cb5..29224b77 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -10,6 +10,10 @@ option('glib-src-dir', type: 'string',
description: 'Source directory for glib - needed to add docs to gir'
)
+option('gtk-doc', type: 'boolean', value: false,
+ description: 'Build and install documentation'
+)
+
option('gir_build', type: 'boolean',
description: 'Windows: post build (gir) stuff'
)