[devhelp] meson: build GTK-Doc documentation
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] meson: build GTK-Doc documentation
- Date: Fri, 23 Mar 2018 08:13:04 +0000 (UTC)
commit 90b84f532d5c5b22a7808095f2fe513a203564b6
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Mar 22 19:10:42 2018 +0100
meson: build GTK-Doc documentation
docs/reference/meson.build | 22 ++++++++++++++++++++++
docs/reference/xml/gtkdocentities.ent.in | 2 ++
docs/reference/xml/meson.build | 11 +++++++++++
meson.build | 4 ++++
meson_options.txt | 1 +
5 files changed, 40 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
new file mode 100644
index 0000000..4f9c692
--- /dev/null
+++ b/docs/reference/meson.build
@@ -0,0 +1,22 @@
+subdir('xml')
+
+GNOME.gtkdoc(
+ 'devhelp',
+ main_xml : 'devhelp-docs.xml',
+ src_dir : include_directories('../../devhelp/'),
+ dependencies : SHARED_LIBDEVHELP_DECLARED_DEP,
+ scan_args : ['--rebuild-types'],
+ gobject_typesfile : 'devhelp.types',
+ content_files : [
+ 'api-breaks.xml'
+ ],
+ ignore_headers : [
+ 'dh-dconf-migration.h',
+ 'dh-error.h',
+ 'dh-parser.h',
+ 'dh-search-context.h',
+ 'dh-settings.h',
+ 'dh-util-lib.h'
+ ],
+ install : true
+)
diff --git a/docs/reference/xml/gtkdocentities.ent.in b/docs/reference/xml/gtkdocentities.ent.in
new file mode 100644
index 0000000..5d96432
--- /dev/null
+++ b/docs/reference/xml/gtkdocentities.ent.in
@@ -0,0 +1,2 @@
+<!ENTITY package_name "@PACKAGE_NAME@">
+<!ENTITY package_string "@PACKAGE_STRING@">
diff --git a/docs/reference/xml/meson.build b/docs/reference/xml/meson.build
new file mode 100644
index 0000000..30f8bc0
--- /dev/null
+++ b/docs/reference/xml/meson.build
@@ -0,0 +1,11 @@
+gtkdocentities_conf_data = configuration_data()
+gtkdocentities_conf_data.set('PACKAGE_NAME', 'Devhelp')
+gtkdocentities_conf_data.set('PACKAGE_STRING', 'Devhelp @0@'.format(meson.project_version()))
+
+gtkdocentities_filename = 'gtkdocentities.ent'
+
+configure_file(
+ input : gtkdocentities_filename + '.in',
+ output : gtkdocentities_filename,
+ configuration : gtkdocentities_conf_data
+)
diff --git a/meson.build b/meson.build
index 8917ad4..1eaf23e 100644
--- a/meson.build
+++ b/meson.build
@@ -152,6 +152,10 @@ subdir('devhelp')
subdir('src')
subdir('unit-tests')
+if get_option('gtk_doc')
+ subdir('docs/reference')
+endif
+
meson.add_install_script(
'meson_post_install.py',
join_paths(get_option('prefix'), get_option('datadir'))
diff --git a/meson_options.txt b/meson_options.txt
index 489dc20..a10fc60 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1 +1,2 @@
option('flatpak_build', type : 'boolean', value : false, description : 'Flatpak build mode')
+option('gtk_doc', type : 'boolean', value : false, description : 'Build the API reference')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]