From 2cd4f1a7c830ff3e6fd2b0b4ff1105c972b287f1 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 17 Feb 2025 15:29:31 +0100 Subject: [PATCH] dnsdist docs (html-docs, tarball and pdf) --- pdns/dnsdistdist/meson.build | 45 +++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/meson.build b/pdns/dnsdistdist/meson.build index 6900e9bfab6b..63b651bf7037 100644 --- a/pdns/dnsdistdist/meson.build +++ b/pdns/dnsdistdist/meson.build @@ -688,4 +688,47 @@ install_data( 'dnsdist.conf-dist', install_dir : get_option('sysconfdir'), follow_symlinks: true -) \ No newline at end of file +) + +html_docs = custom_target( + 'html-docs', + command: [ + python, + product_source_dir / docs_dir / 'generate-docs.py', + '--build-root', '@BUILD_ROOT@', + '--source-root', '@SOURCE_ROOT@', + '--venv-name', 'venv-docs', + '--requirements-file', docs_dir / 'requirements.txt', + '--source-directory', docs_dir, + '--target-directory', '@BUILD_ROOT@' / 'html-docs', + ], + output: 'html-docs', + console: true, +) + +docs_tarball = custom_target( + 'html-docs.tar.bz2', + command: ['tar', 'cjf', 'html-docs.tar.bz2', html_docs], + output: 'html-docs.tar.bz2', +) + +latex_docs = custom_target( + command: [ + python, + product_source_dir / docs_dir / 'generate-docs.py', + '--build-root', '@BUILD_ROOT@', + '--source-root', '@SOURCE_ROOT@', + '--venv-name', 'venv-docs', + '--requirements-file', docs_dir / 'requirements.txt', + '--source-directory', docs_dir, + '--target-directory', '@BUILD_ROOT@', + '--latex-name', 'dnsdist.pdf', + ], + output: 'dnsdist.pdf', + console: true, +) + +run_target( + 'all-docs', + command: ['echo', html_docs, docs_tarball, latex_docs], +)