diff options
author | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-03-20 09:19:55 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2023-03-24 15:35:33 +0100 |
commit | 3ebf992e22842a5e9b5425fa30769784c9fb5baa (patch) | |
tree | 7ce66d64b54306fa4e8aab9e035abb880612469c /docs | |
parent | ed1ed0af5c23ccaf9b209613ba095b066a111bd0 (diff) |
testplan: build also a PDF file with the testplan
PDF files are easier to share, and it costs almost nothing to
produce them with Sphinx, via rst2pdf. Added support for it
if rst2pdf is installed.
Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/testplan/meson.build | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/testplan/meson.build b/docs/testplan/meson.build index 11c085733..50063aa2e 100644 --- a/docs/testplan/meson.build +++ b/docs/testplan/meson.build @@ -5,6 +5,7 @@ build_sphinx = get_option('sphinx') rst2html = find_program('rst2html-3', 'rst2html', required : build_testplan) sphinx = find_program('sphinx-build', required: build_sphinx) +rst2pdf = find_program('rst2pdf', required: false) stylesheet = meson.current_source_dir() + '/testplan.css' @@ -52,8 +53,23 @@ if sphinx.found() output : 'index.html' ) endif + + if rst2pdf.found() + sphinx_out_pdf = meson.current_build_dir() + '/pdf' + + custom_target('xe_tests.pdf', + build_by_default : true, + command : [ 'sphinx-build', '-c', meson.current_source_dir(), + '-b', 'pdf', + '-D', 'version=' + meson.project_version(), + meson.current_build_dir(), sphinx_out_pdf], + input : index_rst, + output : 'xe_tests.pdf' + ) + endif endif build_info += 'Build ReST test documentation: @0@'.format(igt_doc_script.found()) build_info += 'Build simple html testplan documentation: @0@'.format(rst2html.found()) build_info += 'Build indexed html testplan documentation: @0@'.format(sphinx.found()) +build_info += 'Build pdf testplan documentation: @0@'.format(sphinx.found() and rst2pdf.found()) |