diff options
author | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-03-21 09:11:55 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-03-24 15:35:44 +0100 |
commit | 482c12c333a76ede0906b3968cd3b1fb0e9bf570 (patch) | |
tree | 23ee450c49426b86a57a9cc1bfa5436c610bc23c | |
parent | 3ebf992e22842a5e9b5425fa30769784c9fb5baa (diff) |
meson.build: place gtk-doc dependencies check at the right place
The requirement for having gtk-doc is specific to
docs/reference/igt-gpu-tools.
Moved the code to be there. This lets build testplan docs
without needing gtk-doc (nor having the IGT executables).
It should be noticed that testplan indirectly depends on
build_tests, for one reason only: the tests subdir is only
included if build_tests is true. Without it, the xe_test_config
variable will be undefined, as it is declared inside a tests
subdir.
To ensure that the variable is declared we need to add an extra
test for the testplan subdir.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
-rw-r--r-- | docs/meson.build | 5 | ||||
-rw-r--r-- | docs/reference/meson.build | 9 | ||||
-rw-r--r-- | meson.build | 11 |
3 files changed, 15 insertions, 10 deletions
diff --git a/docs/meson.build b/docs/meson.build index 01edf64f0..9bfec8fee 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -1,2 +1,5 @@ subdir('reference') -subdir('testplan') + +if xe_test_config != '' + subdir('testplan') +endif diff --git a/docs/reference/meson.build b/docs/reference/meson.build index 85a8aa47f..12ccbd911 100644 --- a/docs/reference/meson.build +++ b/docs/reference/meson.build @@ -1 +1,8 @@ -subdir('igt-gpu-tools') +gtk_doc = dependency('gtk-doc', required : build_docs) +if build_tests and gtk_doc.found() + subdir('igt-gpu-tools') +elif build_docs.enabled() + error('Documentation requires building tests') +endif + +build_info += 'Build reference documentation: @0@'.format(build_docs.enabled()) diff --git a/meson.build b/meson.build index cbb7ead7d..b896283e3 100644 --- a/meson.build +++ b/meson.build @@ -320,6 +320,8 @@ endif subdir('lib') if build_tests subdir('tests') +else + xe_test_config = '' endif build_info += 'Build tests: @0@'.format(build_tests) @@ -332,14 +334,7 @@ endif subdir('overlay') subdir('man') subdir('scripts') - -gtk_doc = dependency('gtk-doc', required : build_docs) -if build_tests and gtk_doc.found() - subdir('docs') -elif build_docs.enabled() - error('Documentation requires building tests') -endif -build_info += 'Build documentation: @0@'.format(build_tests and gtk_doc.found()) +subdir('docs') message('Build options') message('=============') |