[gitg/wip/valadoc: 9/12] meson: Fix valadoc documentation generation
- From: Alberto Fanjul <albfan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/wip/valadoc: 9/12] meson: Fix valadoc documentation generation
- Date: Fri, 12 Oct 2018 10:13:06 +0000 (UTC)
commit 5a32e34935e78a537e9259c0cd2304d39382dc46
Author: Iñigo Martínez <inigomartinez gmail com>
Date: Fri Oct 5 09:24:44 2018 +0200
meson: Fix valadoc documentation generation
autotools is able to generate documentation by using the `valadoc`
program. However, meson is not able to generate this documentation.
meson build files has been fixed to be able to generate `valadoc`
documentation.
libgitg-ext/meson.build | 10 ++++++----
meson.build | 7 +------
2 files changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/libgitg-ext/meson.build b/libgitg-ext/meson.build
index f028965b..7a8a1a23 100644
--- a/libgitg-ext/meson.build
+++ b/libgitg-ext/meson.build
@@ -84,7 +84,7 @@ pkg.generate(
)
# FIXME: does not work due to missing proper valadoc support
-if enable_docs
+if get_option('docs')
vala_pkgs = [
'--pkg', 'ggit-1.0',
'--pkg', 'gio-2.0',
@@ -94,18 +94,20 @@ if enable_docs
]
valaproc_cmd = [
- valadoc,
+ find_program('valadoc'),
'--directory', join_paths(source_root, 'docs'),
'--package-name', 'gitgext',
vala_pkgs,
'--basedir', source_root,
- '--vapidir', join_paths(build_root, 'gitg'),
- sources,
+ '--vapidir', vapi_dir,
+ '--vapidir', libgitg_dir,
+ sources + [join_paths(libgitg_build_dir, libgitg_vapi_name)],
]
run_target(
'libgitg-ext-docs',
command: valaproc_cmd,
+ depends: libgitg,
)
endif
diff --git a/meson.build b/meson.build
index cc206740..ad21f6f0 100644
--- a/meson.build
+++ b/meson.build
@@ -47,6 +47,7 @@ pkg = import('pkgconfig')
source_root = meson.current_source_dir()
build_root = meson.current_build_dir()
+libgitg_dir = join_paths(source_root, 'libgitg')
po_dir = join_paths(source_root, 'po')
vapi_dir = join_paths(source_root, 'vapi')
@@ -173,12 +174,6 @@ config_h.set_quoted('PLATFORM_NAME', platform_name)
g_ir_compiler = find_program('g-ir-compiler')
-enable_docs = get_option('docs')
-if enable_docs
- docs_dir = join_paths(source_root, 'docs')
- valadoc = find_program('valadoc')
-endif
-
subdir('po')
subdir('contrib/xml')
subdir('contrib/ide')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]