gplugin/gplugin

Initial gtk-doc skeleton setup
feature/gtk-doc
2017-07-31, Gary Kramlich
21e520cc55ac
Parents fbb7d408c7e0
Children 30f9ec0c2972
Initial gtk-doc skeleton setup
--- a/gplugin/meson.build Mon Jul 31 20:09:32 2017 -0500
+++ b/gplugin/meson.build Mon Jul 31 20:56:39 2017 -0500
@@ -113,12 +113,16 @@
output : 'gplugin-version.h',
configuration : version_conf,
install : true,
- install_dir : join_paths(get_option('includedir'), 'gplugin-1.0', 'gplugin'))
+ install_dir : join_paths(get_option('includedir'), 'gplugin-1.0', 'gplugin')
+)
+
GPLUGIN_PUBLIC_BUILT_HEADERS += [
gplugin_version_h
]
+gplugin_inc = include_directories('.')
+
# Build gplugin.h
GPLUGIN_H_INCLUDES = ''
@@ -127,6 +131,7 @@
GPLUGIN_H_INCLUDES,
header)
endforeach
+
foreach header : ['gplugin-version.h', 'gplugin-enums.h'] # GPLUGIN_PUBLIC_BUILT_HEADERS
GPLUGIN_H_INCLUDES = '@0@\n#include <gplugin/@1@>'.format(
GPLUGIN_H_INCLUDES,
@@ -180,6 +185,7 @@
version : GPLUGIN_LIBRARY_VERSION,
install : true
)
+
gplugin_dep = declare_dependency(
include_directories : [toplevel_inc, include_directories('.')],
link_with : gplugin,
@@ -270,3 +276,7 @@
# subdirectories
###############################################################################
subdir('tests')
+
+if ENABLE_DOC
+ subdir('reference')
+endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/gplugin-docs.xml Mon Jul 31 20:56:39 2017 -0500
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+
+<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
+<!ENTITY version SYSTEM "version.xml">
+]>
+<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
+ <bookinfo>
+ <title>GPlugin Reference Manual</title>
+ <abstract>
+ <title>GPlugin &version;</title>
+ <para>
+ GPlugin is a GObject based library that implements a reusable plugin system
+that supports loading plugins in other languages via loaders. GPlugin also
+implements dependencies among the plugins.
+ </para>
+ </abstract>
+ </bookinfo>
+
+ <part id="API">
+ <title>API Reference</title>
+ </part>
+
+ <index id="api-index-full">
+ <title>Index</title>
+ <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
+ </index>
+ <index id="api-index-deprecated" role="deprecated">
+ <title>Index of deprecated symbols</title>
+ <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
+ </index>
+<!-- <index id="api-index-2.11.0" role="2.11.0">
+ <title>Index of new symbols in 2.11.0</title>
+ <xi:include href="xml/api-index-2.11.0.xml"><xi:fallback /></xi:include>
+ </index>
+ -->
+ <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
+</book>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/meson.build Mon Jul 31 20:56:39 2017 -0500
@@ -0,0 +1,37 @@
+DOC_MODULE = 'gplugin'
+
+# Header files or dirs to ignore when scanning. Use base file/dir names
+ignore_hfiles = ['dynamic-test.h']
+ignore_hfiles += GPLUGIN_PRIVATE_HEADERS
+
+# Extra options to supply to gtkdoc-scan.
+scan_args = [
+ '--deprecated-guards=GPLUGIN_DISABLE_DEPRECATED',
+ '--rebuild-types',
+ '--rebuild-sections',
+ '--ignore-headers=' + ' '.join(ignore_hfiles),
+]
+
+# Extra options to supply to gtkdoc-mkdb.
+mkdb_args = [
+ '--ignore-files=' + ' '.join(ignore_hfiles),
+]
+
+gplugin_version_xml = configure_file(
+ input : 'version.xml.in',
+ output : 'version.xml',
+ configuration : version_conf)
+
+content_files = [
+]
+
+gnome.gtkdoc(DOC_MODULE,
+ main_xml : DOC_MODULE + '-docs.xml',
+ src_dir : gplugin_inc,
+ dependencies : gplugin_dep,
+ install : true,
+ scan_args : scan_args,
+ mkdb_args : mkdb_args,
+ gobject_typesfile : DOC_MODULE + '.types',
+ content_files : content_files,
+)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/gplugin/reference/version.xml.in Mon Jul 31 20:56:39 2017 -0500
@@ -0,0 +1,1 @@
+@GPLUGIN_VERSION@
--- a/meson.build Mon Jul 31 20:09:32 2017 -0500
+++ b/meson.build Mon Jul 31 20:56:39 2017 -0500
@@ -93,6 +93,20 @@
toplevel_inc = include_directories('.')
+
+###############################################################################
+# gtk-doc
+###############################################################################
+ENABLE_DOC = get_option('doc')
+if ENABLE_DOC
+ if meson.version().version_compare('<0.41.2')
+ if force_deps
+ error('Meson 0.41.2 or newer is required to build documentation.')
+ endif
+ ENABLE_DOC = false
+ endif
+endif
+
###############################################################################
# Subdirectories
###############################################################################
--- a/meson_options.txt Mon Jul 31 20:09:32 2017 -0500
+++ b/meson_options.txt Mon Jul 31 20:56:39 2017 -0500
@@ -20,9 +20,15 @@
)
option(
- 'gtk3',
+ 'doc',
+ type : 'boolean', value : false,
+ description : 'build documentation with gtk-doc'
+)
+
+option(
+ 'gtk3',
type : 'boolean', value : true,
- description : 'Whether or not to build the gtk3 library'
+ description : 'Whether or not to build the gtk3 library'
)
option(