summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2017-11-06 16:28:28 +0100
committerTomas Popela <tpopela@redhat.com>2018-04-11 12:39:19 +0200
commitf0b481582cf019720ebb7d3519bf5da48c28b1b1 (patch)
tree01f5e4de2fcb55337532892c5442c7d152e9d047
parent8737298051605369b12ae0ab894beb03a2538020 (diff)
downloadlibsoup-f0b481582cf019720ebb7d3519bf5da48c28b1b1.tar.gz
Add support for building the documentation
-rw-r--r--docs/reference/meson.build75
-rw-r--r--meson.build4
-rw-r--r--meson_options.txt6
3 files changed, 85 insertions, 0 deletions
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
new file mode 100644
index 00000000..57b2509a
--- /dev/null
+++ b/docs/reference/meson.build
@@ -0,0 +1,75 @@
+ignore_headers = [
+ 'soup.h',
+ 'soup-autocleanups.h',
+ 'soup-enum-types.h',
+ 'soup-message-private.h',
+ 'soup-session-private.h',
+ 'soup-auth-basic.h',
+ 'soup-auth-digest.h',
+ 'soup-auth-ntlm.h',
+ 'soup-auth-negotiate.h',
+ 'soup-connection.h',
+ 'soup-connection-auth.h',
+ 'soup-message-queue.h',
+ 'soup-path-map.h',
+ 'soup-gnome-features.h',
+ 'soup-proxy-resolver.h',
+ 'soup-proxy-resolver-gnome.h',
+ 'soup-proxy-resolver-static.h',
+ 'soup-directory-input-stream.h',
+ 'soup-http-input-stream.h',
+ 'soup-password-manager.h',
+ 'soup-password-manager-gnome.h',
+ 'soup-converter-wrapper.h',
+ 'soup-body-input-stream.h',
+ 'soup-body-output-stream.h',
+ 'soup-client-input-stream.h',
+ 'soup-content-processor.h',
+ 'soup-content-sniffer-stream.h',
+ 'soup-io-stream.h',
+ 'soup-cache-input-stream.h',
+ 'soup-filter-input-stream.h',
+ 'soup-cookie-jar-sqlite.h',
+ 'soup-requester.h',
+ 'soup-tld-private.h',
+ 'soup-misc-private.h',
+ 'soup-proxy-uri-resolver.h',
+ 'soup-proxy-resolver-wrapper.h',
+ 'soup-proxy-uri-resolver.h',
+ 'soup-cache-private.h',
+ 'soup-cache-client-input-stream.h',
+ 'soup-socket-private.h',
+ 'soup-value-utils.h',
+ 'soup-xmlrpc-old.h'
+]
+
+mkdb_args = [
+ '--sgml-mode',
+ '--output-format=xml'
+]
+
+scan_args = [
+ '--deprecated-guards=SOUP_DISABLE_DEPRECATED',
+ '--rebuild-types',
+ '--ignore-decorators="SOUP_DEPRECATED\w*\s*\([^)]*\)|SOUP_DEPRECATED\w*|SOUP_AVAILABLE\w*"'
+]
+
+gnome.gtkdoc('libsoup',
+ main_sgml : 'libsoup-2.4-docs.sgml',
+ src_dir : join_paths(meson.source_root(), 'libsoup'),
+ ignore_headers : ignore_headers,
+ mkdb_args : mkdb_args,
+ scan_args : scan_args,
+ dependencies : [
+ glib_dep,
+ libxml_dep
+ ],
+ install : true,
+ content_files: [
+ 'build-howto.xml',
+ 'client-howto.xml',
+ 'request-howto.xml',
+ 'server-howto.xml',
+ 'session-porting.xml',
+ ]
+)
diff --git a/meson.build b/meson.build
index 759c38f0..b3eb14be 100644
--- a/meson.build
+++ b/meson.build
@@ -206,3 +206,7 @@ endif
subdir('libsoup')
subdir('examples')
subdir('tests')
+
+if get_option('enable-gtk-doc')
+ subdir('docs/reference')
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 6ba39ea4..4a769378 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -45,3 +45,9 @@ option('enable-vala',
value : false,
description : 'Build Vala bindings'
)
+
+option('enable-gtk-doc',
+ type: 'boolean',
+ value: false,
+ description: 'Enable generating the API reference'
+)