summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-07-12 16:30:51 +0200
committerMichael Catanzaro <mcatanzaro@igalia.com>2017-10-17 16:32:41 -0500
commitf7a71bd57254912547256045b747f9181eef3529 (patch)
treee7278e8dc0fdddc5b2e6acbd74e72c7626c5f497 /docs
parent8ff1b86cb8f6c848be82d99dbb593a50713ce6ad (diff)
downloaddconf-f7a71bd57254912547256045b747f9181eef3529.tar.gz
build: Port to meson build system
meson is a build system focused on speed an ease of use, which helps speeding up the software development. This patch adds meson support along autotools. https://bugzilla.gnome.org/show_bug.cgi?id=784910
Diffstat (limited to 'docs')
-rw-r--r--docs/Makefile.am2
-rw-r--r--docs/meson.build51
2 files changed, 52 insertions, 1 deletions
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 5f7f491..361beee 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -46,6 +46,6 @@ man_MANS += \
dconf.7
endif
-EXTRA_DIST += dconf-service.xml dconf-tool.xml dconf-overview.xml
+EXTRA_DIST += dconf-service.xml dconf-tool.xml dconf-overview.xml meson.build
DISTCLEANFILES = $(man_MANS)
diff --git a/docs/meson.build b/docs/meson.build
new file mode 100644
index 0000000..d74eedf
--- /dev/null
+++ b/docs/meson.build
@@ -0,0 +1,51 @@
+gnome.gtkdoc(
+ meson.project_name(),
+ main_xml: meson.project_name() + '-docs.xml',
+ src_dir: [
+ common_inc,
+ client_inc
+ ],
+ dependencies: libdconf_dep,
+ scan_args: '--rebuild-types',
+ gobject_typesfile: meson.project_name() + '.types',
+ install: true,
+ install_dir: join_paths(dconf_datadir, 'gtk-doc', 'html', meson.project_name())
+)
+
+if get_option('enable-man')
+ xsltproc = find_program('xsltproc', required: false)
+ assert(xsltproc.found(), 'xsltproc is required for enable-man')
+
+ xsltproc_cmd = [
+ xsltproc,
+ '--output', '@OUTPUT@',
+ '--nonet',
+ '--stringparam', 'man.output.quietly', '1',
+ '--stringparam', 'funcsynopsis.style', 'ansi',
+ '--stringparam', 'man.th.extra1.suppress', '1',
+ '--stringparam', 'man.authors.section.enabled', '0',
+ '--stringparam', 'man.copyright.section.enabled', '0',
+ 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
+ '@INPUT@'
+ ]
+
+ mans = [
+ ['dconf-service.xml', 'dconf-service', '1'],
+ ['dconf-tool.xml', 'dconf', '1'],
+ ['dconf-overview.xml', 'dconf', '7']
+ ]
+
+ foreach man: mans
+ output = '@0@.@1@'.format(man[1], man[2])
+ man_dir = 'man' + man[2]
+
+ custom_target(
+ output,
+ input: man[0],
+ output: output,
+ command: xsltproc_cmd,
+ install: true,
+ install_dir: join_paths(dconf_mandir, man_dir)
+ )
+ endforeach
+endif