Commit 142571d0 authored by Emmanuele Bassi's avatar Emmanuele Bassi 👣
Browse files

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.
parent 5cc6b3e3
Pipeline #329570 passed with stages
in 24 minutes and 35 seconds
......@@ -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@',
],
......
......@@ -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@',
],
......
......@@ -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@',
],
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment