[rygel/wip/meson: 35/49] meson: Enable doc generation



commit 6b1bef378866ef2cbf72bd0d6b83e7418191e381
Author: Jens Georg <mail jensge org>
Date:   Fri Oct 12 08:37:46 2018 +0200

    meson: Enable doc generation

 doc/meson.build                                 |  1 +
 doc/reference/librygel-core/meson.build         | 49 ++++++++++++++++++++
 doc/reference/librygel-db/meson.build           | 55 +++++++++++++++++++++++
 doc/reference/librygel-renderer-gst/meson.build | 59 +++++++++++++++++++++++++
 doc/reference/librygel-renderer/meson.build     | 53 ++++++++++++++++++++++
 doc/reference/librygel-server/meson.build       | 54 ++++++++++++++++++++++
 doc/reference/meson.build                       |  5 +++
 meson.build                                     |  3 ++
 src/librygel-core/meson.build                   |  4 +-
 src/librygel-db/meson.build                     |  4 +-
 src/librygel-renderer-gst/meson.build           |  4 +-
 src/librygel-renderer/meson.build               |  5 ++-
 src/librygel-server/meson.build                 |  6 +--
 13 files changed, 291 insertions(+), 11 deletions(-)
---
diff --git a/doc/meson.build b/doc/meson.build
index f8f089c3..41c733e5 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -1 +1,2 @@
 subdir('man')
+subdir('reference')
diff --git a/doc/reference/librygel-core/meson.build b/doc/reference/librygel-core/meson.build
new file mode 100644
index 00000000..48569671
--- /dev/null
+++ b/doc/reference/librygel-core/meson.build
@@ -0,0 +1,49 @@
+core_doc_common_args = [
+        '--package-name', 'librygel-core',
+        '--package-version', '2.6',
+        '-b', join_paths(meson.source_root(), 'src', 'librygel-core'),
+        '--target-glib=2.32',
+        '--pkg', 'rygel-build-config',
+        '--force',
+        '--directory', '@OUTPUT@',
+        '--pkg', 'gio-2.0',
+        '--pkg', 'gee-0.8',
+        '--pkg', 'gupnp-1.0',
+        '--pkg', 'gmodule-2.0',
+        '--pkg', 'posix'
+ ]
+
+custom_target('valadoc-core',
+    input: core_sources,
+    output: 'valadoc',
+    depends : core_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        core_doc_common_args,
+        '-o', 'valadoc',
+        core_sources
+    ]
+)
+
+custom_target('gtkdoc-core',
+    input: core_sources,
+    output: 'gtkdoc',
+    depends : core_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        '--doclet', 'gtkdoc',
+        '-o', 'gtkdoc',
+        core_doc_common_args,
+        '-X', join_paths(meson.build_root(), 'src/librygel-core/rygel-core.h'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-core/librygel-core-2.6.so'),
+        '-b', join_paths(meson.source_root(), 'src', 'librygel-core'),
+        core_sources
+    ]
+)
+
+
diff --git a/doc/reference/librygel-db/meson.build b/doc/reference/librygel-db/meson.build
new file mode 100644
index 00000000..bc8e928b
--- /dev/null
+++ b/doc/reference/librygel-db/meson.build
@@ -0,0 +1,55 @@
+db_doc_common_args = [
+        '--package-name', 'librygel-db',
+        '--package-version', '2.6',
+        '-b', join_paths(meson.source_root(), 'src', 'librygel-db'),
+        '--vapidir', join_paths(meson.source_root(), 'vapi'),
+        '--vapidir', join_paths(meson.source_root(), 'src/librygel-core'),
+        '--vapidir', join_paths(meson.build_root(), 'src/librygel-core'),
+        '--target-glib=2.32',
+        '--pkg', 'rygel-build-config',
+        '--force',
+        '--directory', '@OUTPUT@',
+        '--pkg', 'gio-2.0',
+        '--pkg', 'gee-0.8',
+        '--pkg', 'gupnp-1.0',
+        '--pkg', 'gmodule-2.0',
+        '--pkg', 'posix',
+        '--pkg', 'sqlite3',
+        '--pkg', 'gupnp-av-1.0',
+        '--pkg', 'rygel-core-2.6',
+]
+
+custom_target('valadoc-db',
+    input: db_sources,
+    output: 'valadoc',
+    depends: db_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        db_doc_common_args,
+        '-o', 'valadoc',
+        db_sources
+    ]
+)
+
+custom_target('gtkdoc-db',
+    input: db_sources,
+    output: 'gtkdoc',
+    depends : db_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        db_doc_common_args,
+        '--doclet', 'gtkdoc',
+        '-o', 'gtkdoc',
+        '-X', join_paths(meson.build_root(), 'src/librygel-db/rygel-db.h'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-db/librygel-db-2.6.so'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-core/librygel-core-2.6.so'),
+        db_sources
+    ]
+)
+
diff --git a/doc/reference/librygel-renderer-gst/meson.build b/doc/reference/librygel-renderer-gst/meson.build
new file mode 100644
index 00000000..a7a3de84
--- /dev/null
+++ b/doc/reference/librygel-renderer-gst/meson.build
@@ -0,0 +1,59 @@
+renderer_gst_doc_common_args = [
+        '--package-name', 'librygel-renderer-gst',
+        '--package-version', '2.6',
+        '-b', join_paths(meson.source_root(), 'src', 'librygel-renderer-gst'),
+        '--vapidir', join_paths(meson.source_root(), 'vapi'),
+        '--vapidir', join_paths(meson.source_root(), 'src/librygel-core'),
+        '--vapidir', join_paths(meson.build_root(), 'src/librygel-core'),
+        '--vapidir', join_paths(meson.build_root(), 'src', 'librygel-renderer'),
+        '--target-glib=2.32',
+        '--pkg', 'rygel-build-config',
+        '--force',
+        '--directory', '@OUTPUT@',
+        '--pkg', 'gio-2.0',
+        '--pkg', 'gee-0.8',
+        '--pkg', 'gupnp-1.0',
+        '--pkg', 'gmodule-2.0',
+        '--pkg', 'posix',
+        '--pkg', 'gupnp-av-1.0',
+        '--pkg', 'rygel-core-2.6',
+        '--pkg', 'rygel-renderer-2.6',
+        '--pkg', 'gstreamer-1.0',
+        '--pkg', 'gstreamer-audio-1.0'
+]
+
+custom_target('valadoc-renderer-gst',
+    input: renderer_gst_sources,
+    output: 'valadoc',
+    depends : renderer_gst_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        renderer_gst_doc_common_args,
+        '-o', 'valadoc',
+        renderer_gst_sources
+    ]
+)
+
+custom_target('gtkdoc-renderer-gst',
+    input: renderer_gst_sources,
+    output: 'gtkdoc',
+    depends : renderer_gst_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        renderer_gst_doc_common_args,
+        '--doclet', 'gtkdoc',
+        '-o', 'gtkdoc',
+        '-X', join_paths(meson.build_root(), 'src/librygel-renderer/rygel-renderer.h'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-renderer/librygel-renderer-2.6.so'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-core/librygel-core-2.6.so'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-renderer-gst/librygel-renderer-gst-2.6.so'),
+        renderer_gst_sources
+    ]
+)
\ No newline at end of file
diff --git a/doc/reference/librygel-renderer/meson.build b/doc/reference/librygel-renderer/meson.build
new file mode 100644
index 00000000..f09e8d53
--- /dev/null
+++ b/doc/reference/librygel-renderer/meson.build
@@ -0,0 +1,53 @@
+renderer_doc_common_args = [
+        '--package-name', 'librygel-renderer',
+        '--package-version', '2.6',
+        '-b', join_paths(meson.source_root(), 'src', 'librygel-renderer'),
+        '--vapidir', join_paths(meson.source_root(), 'vapi'),
+        '--vapidir', join_paths(meson.source_root(), 'src/librygel-core'),
+        '--vapidir', join_paths(meson.build_root(), 'src/librygel-core'),
+        '--target-glib=2.32',
+        '--pkg', 'rygel-build-config',
+        '--force',
+        '--directory', '@OUTPUT@',
+        '--pkg', 'gio-2.0',
+        '--pkg', 'gee-0.8',
+        '--pkg', 'gupnp-1.0',
+        '--pkg', 'gmodule-2.0',
+        '--pkg', 'posix',
+        '--pkg', 'gupnp-av-1.0',
+        '--pkg', 'rygel-core-2.6'
+]
+
+custom_target('valadoc-renderer',
+    input: renderer_sources,
+    output: 'valadoc',
+    depends: renderer_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        renderer_doc_common_args,
+        '-o', 'valadoc',
+        renderer_sources
+    ]
+)
+
+custom_target('gtkdoc-renderer',
+    input: renderer_sources,
+    output: 'gtkdoc',
+    depends : renderer_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        renderer_doc_common_args,
+        '--doclet', 'gtkdoc',
+        '-o', 'gtkdoc',
+        '-X', join_paths(meson.build_root(), 'src/librygel-renderer/rygel-renderer.h'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-renderer/librygel-renderer-2.6.so'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-core/librygel-core-2.6.so'),
+        renderer_sources
+    ]
+)
diff --git a/doc/reference/librygel-server/meson.build b/doc/reference/librygel-server/meson.build
new file mode 100644
index 00000000..08ef35a6
--- /dev/null
+++ b/doc/reference/librygel-server/meson.build
@@ -0,0 +1,54 @@
+server_doc_common_args = [
+        '--package-name', 'librygel-server',
+        '--package-version', '2.6',
+        '-b', join_paths(meson.source_root(), 'src', 'librygel-server'),
+        '--vapidir', join_paths(meson.source_root(), 'vapi'),
+        '--vapidir', join_paths(meson.source_root(), 'src/librygel-core'),
+        '--vapidir', join_paths(meson.build_root(), 'src/librygel-core'),
+        '--target-glib=2.32',
+        '--pkg', 'rygel-build-config',
+        '--force',
+        '--directory', '@OUTPUT@',
+        '--pkg', 'gio-2.0',
+        '--pkg', 'gee-0.8',
+        '--pkg', 'gupnp-1.0',
+        '--pkg', 'gmodule-2.0',
+        '--pkg', 'posix',
+        '--pkg', 'gupnp-av-1.0',
+        '--pkg', 'rygel-core-2.6',
+        '--pkg', 'libmediaart-2.0'
+]
+
+custom_target('valadoc-server',
+    input: server_sources,
+    output: 'valadoc',
+    depends : server_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        server_doc_common_args,
+        '-o', 'valadoc',
+        server_sources
+    ]
+)
+
+custom_target('gtkdoc-server',
+    input: server_sources,
+    output: 'gtkdoc',
+    depends : server_lib,
+    build_by_default : true,
+    command :
+    [
+        valadoc,
+        server_doc_common_args,
+        '--doclet', 'gtkdoc',
+        '-o', 'gtkdoc',
+        '-X', join_paths(meson.build_root(), 'src/librygel-server/rygel-server.h'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-server/librygel-server-2.6.so'),
+        '-X', '-l',
+        '-X', join_paths(meson.build_root(), 'src/librygel-core/librygel-core-2.6.so'),
+        server_sources
+    ]
+)
diff --git a/doc/reference/meson.build b/doc/reference/meson.build
new file mode 100644
index 00000000..443762f2
--- /dev/null
+++ b/doc/reference/meson.build
@@ -0,0 +1,5 @@
+subdir('librygel-core')
+subdir('librygel-db')
+subdir('librygel-renderer')
+subdir('librygel-renderer-gst')
+subdir('librygel-server')
\ No newline at end of file
diff --git a/meson.build b/meson.build
index 342df3d7..700ba6a0 100644
--- a/meson.build
+++ b/meson.build
@@ -56,6 +56,9 @@ config_include = include_directories('.')
 
 add_global_arguments(['-include','config.h'], language : 'c')
 
+valadoc = find_program('valadoc', required : false)
+gtkdoc = dependency('gtk-doc', required : false)
+
 vala = meson.get_compiler('vala')
 gupnp = dependency('gupnp-1.0', version : '>= 0.24.14')
 gee = dependency('gee-0.8', version: '>= 0.8.0')
diff --git a/src/librygel-core/meson.build b/src/librygel-core/meson.build
index 6f471932..048ac35d 100644
--- a/src/librygel-core/meson.build
+++ b/src/librygel-core/meson.build
@@ -1,4 +1,4 @@
-core_sources = [
+core_sources = files(
     'rygel-connection-manager.vala',
     'rygel-basic-management.vala',
     'rygel-basic-management-test.vala',
@@ -29,7 +29,7 @@ core_sources = [
     'rygel-xml-utils.vala',
     'rygel-plugin-information.vala',
     'rygel-energy-management-helper.c',
-    'rygel-build-config.vapi']
+    'rygel-build-config.vapi')
 
 build_config = declare_dependency(include_directories : config_include,
                                   sources : 'rygel-build-config.vapi')
diff --git a/src/librygel-db/meson.build b/src/librygel-db/meson.build
index e9126479..ec7eaf3e 100644
--- a/src/librygel-db/meson.build
+++ b/src/librygel-db/meson.build
@@ -1,10 +1,10 @@
-db_sources = [
+db_sources = files(
     'database-cursor.vala',
     'database.vala',
     'sql-function.vala',
     'sql-operator.vala',
     'collate.c'
-]
+)
 
 db_lib = library('rygel-db-2.6', db_sources,
         dependencies : db_deps + [rygel_core],
diff --git a/src/librygel-renderer-gst/meson.build b/src/librygel-renderer-gst/meson.build
index bdcf8187..aa564119 100644
--- a/src/librygel-renderer-gst/meson.build
+++ b/src/librygel-renderer-gst/meson.build
@@ -1,7 +1,7 @@
-renderer_gst_sources = [
+renderer_gst_sources = files(
     'rygel-playbin-player.vala',
     'rygel-playbin-renderer.vala',
-]
+)
 
 renderer_gst_lib = library('rygel-renderer-gst-2.6', renderer_gst_sources,
         dependencies : renderer_gst_deps + [build_config, rygel_core, rygel_renderer],
diff --git a/src/librygel-renderer/meson.build b/src/librygel-renderer/meson.build
index 94948977..b14eef66 100644
--- a/src/librygel-renderer/meson.build
+++ b/src/librygel-renderer/meson.build
@@ -1,4 +1,4 @@
-renderer_sources = [
+renderer_sources = files(
     'rygel-media-renderer-plugin.vala',
     'rygel-media-player.vala',
     'rygel-media-renderer.vala',
@@ -9,7 +9,8 @@ renderer_sources = [
     'rygel-sink-connection-manager.vala',
     'rygel-time-utils.vala',
     'rygel-changelog.vala',
-    'rygel-volume.vala']
+    'rygel-volume.vala'
+)
 
 renderer_lib = library('rygel-renderer-2.6', renderer_sources,
         dependencies : renderer_deps + [build_config, rygel_core],
diff --git a/src/librygel-server/meson.build b/src/librygel-server/meson.build
index a57ac7c3..35910283 100644
--- a/src/librygel-server/meson.build
+++ b/src/librygel-server/meson.build
@@ -1,4 +1,4 @@
-server_sources = [
+server_sources = files(
     'rygel-audio-item.vala',
     'rygel-image-item.vala',
     'rygel-logical-expression.vala',
@@ -87,7 +87,7 @@ server_sources = [
     'rygel-dtcp-cleartext-request.vala',
     'rygel-dtcp-cleartext-response.vala',
     'rygel-dlna-available-seek-request.vala',
-    'rygel-dlna-available-seek-response.vala']
+    'rygel-dlna-available-seek-response.vala')
 
 server_lib = library('rygel-server-2.6', server_sources,
         dependencies : server_deps + [build_config, rygel_core],
@@ -131,4 +131,4 @@ rygel_server = declare_dependency(include_directories: include_directories('.'),
                                   link_with: server_lib)
 
 # necessary to be able to pass it to g-ir-compiler in other libs
-server_girdir = meson.current_build_dir()
+server_girdir = meson.current_build_dir()
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]