[geary/mjog/port-to-libhandy-1: 87/95] build: Generate valadoc vapidir args to reduce command boilerplate
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/port-to-libhandy-1: 87/95] build: Generate valadoc vapidir args to reduce command boilerplate
- Date: Tue, 18 Aug 2020 11:36:03 +0000 (UTC)
commit 026b59fde158b59324540a10490a6cae094e2f18
Author: Michael Gratton <mike vee net>
Date: Sun Aug 16 17:19:03 2020 +1000
build: Generate valadoc vapidir args to reduce command boilerplate
src/meson.build | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index bcbc988de..314650d2d 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -132,7 +132,9 @@ valadoc_dependencies = [
]
# Hopefully Meson will get baked-in valadoc support, so we don't have
-# to do this any more. https://github.com/mesonbuild/meson/issues/894
+# to resort to these kinds of hacks any more. See
+# https://github.com/mesonbuild/meson/issues/894
+
valadoc_dep_args = []
foreach dep : valadoc_dependencies
valadoc_dep_args += '--pkg'
@@ -140,6 +142,16 @@ foreach dep : valadoc_dependencies
endforeach
valadoc_dep_args += [ '--pkg', 'posix' ]
+valadoc_vapi_dirs = [
+ vapi_dir,
+ meson.current_build_dir()
+]
+
+valadoc_vapidir_args = []
+foreach dir : valadoc_vapi_dirs
+ valadoc_vapidir_args += '--vapidir=@0@'.format(dir)
+endforeach
+
if enable_valadoc
docs = custom_target('valadoc',
build_by_default: true,
@@ -154,9 +166,8 @@ if enable_valadoc
'--package-version=@0@'.format(meson.project_version()),
'-b', meson.current_source_dir(),
'-o', '@OUTPUT@',
- '--vapidir=@0@'.format(vapi_dir),
- '--vapidir=@0@'.format(meson.current_build_dir()),
- '@INPUT@',
- ] + valadoc_dep_args
+ ] + valadoc_dep_args + valadoc_vapidir_args + [
+ '@INPUT@'
+ ]
)
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]