[gtk/build-fix: 3/3] build: Collect gi-docgen's common arguments
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/build-fix: 3/3] build: Collect gi-docgen's common arguments
- Date: Mon, 1 Nov 2021 13:02:33 +0000 (UTC)
commit 142571d0b871962bedbff09a0b3ed7fbd64701e2
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Nov 1 13:00:51 2021 +0000
build: Collect gi-docgen's common arguments
And only enable `--fatal-warnings` if `-Dwerror` has been set, just like
we do for the introspection data generation.
docs/reference/gdk/meson.build | 12 +++---------
docs/reference/gsk/meson.build | 4 +---
docs/reference/gtk/meson.build | 4 +---
docs/reference/meson.build | 9 +++++++++
4 files changed, 14 insertions(+), 15 deletions(-)
---
diff --git a/docs/reference/gdk/meson.build b/docs/reference/gdk/meson.build
index 57da47f5f1..9a38c618d6 100644
--- a/docs/reference/gdk/meson.build
+++ b/docs/reference/gdk/meson.build
@@ -16,12 +16,10 @@ if get_option('gtk_doc')
command: [
gidocgen,
'generate',
- '--quiet',
- '--fatal-warnings',
+ gidocgen_common_args,
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
- '--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT1@',
],
@@ -46,12 +44,10 @@ if get_option('gtk_doc')
command: [
gidocgen,
'generate',
- '--quiet',
- '--fatal-warnings',
+ gidocgen_common_args,
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
- '--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT1@',
],
@@ -78,12 +74,10 @@ if get_option('gtk_doc')
command: [
gidocgen,
'generate',
- '--quiet',
- '--fatal-warnings',
+ gidocgen_common_args,
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
- '--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT1@',
],
diff --git a/docs/reference/gsk/meson.build b/docs/reference/gsk/meson.build
index 13f636091d..abb30381e6 100644
--- a/docs/reference/gsk/meson.build
+++ b/docs/reference/gsk/meson.build
@@ -13,12 +13,10 @@ if get_option('gtk_doc')
command: [
gidocgen,
'generate',
- '--quiet',
- '--fatal-warnings',
+ gidocgen_common_args,
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
- '--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT1@',
],
diff --git a/docs/reference/gtk/meson.build b/docs/reference/gtk/meson.build
index 7ae01f0451..441207c2b2 100644
--- a/docs/reference/gtk/meson.build
+++ b/docs/reference/gtk/meson.build
@@ -42,12 +42,10 @@ if get_option('gtk_doc')
command: [
gidocgen,
'generate',
- '--quiet',
- '--fatal-warnings',
+ gidocgen_common_args,
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
- '--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT1@',
],
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
index 4ca44b67e8..df5e3d9909 100644
--- a/docs/reference/meson.build
+++ b/docs/reference/meson.build
@@ -3,6 +3,15 @@ toml_conf.set('version', meson.project_version())
gidocgen = find_program('gi-docgen', required: get_option('gtk_doc'))
+gidocgen_common_args = [
+ '--quiet',
+ '--no-namespace-dir',
+]
+
+if get_option('werror')
+ gidocgen_common_args += ['--fatal-warnings']
+endif
+
docs_dir = gtk_datadir / 'doc'
if get_option('gtk_doc') and not build_gir
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]