From: Remi Gacogne Date: Fri, 14 Feb 2025 13:32:52 +0000 (+0100) Subject: dnsdist: Only generate man pages when needed w/ meson X-Git-Tag: dnsdist-2.0.0-alpha1~83^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db2278eb35a686960991bf4b4cfc94b4034682da;p=thirdparty%2Fpdns.git dnsdist: Only generate man pages when needed w/ meson Thanks, Otto! --- diff --git a/pdns/dnsdistdist/meson.build b/pdns/dnsdistdist/meson.build index 7679cfdce9..c5dcbded77 100644 --- a/pdns/dnsdistdist/meson.build +++ b/pdns/dnsdistdist/meson.build @@ -574,27 +574,34 @@ if get_option('man-pages') and python.found() foreach tool, info: tools if 'manpages' in info foreach man_page: info['manpages'] - generated_man_pages += man_page + if not fs.is_file(man_page) + generated_man_pages += man_page + endif endforeach endif endforeach - custom_target( - 'man-pages', - input: man_pages, - output: generated_man_pages, - install: true, - install_dir: join_paths(get_option('mandir'), 'man1'), - command: [ - python, - product_source_dir / docs_dir / 'generate-man-pages.py', - '--build-root', '@BUILD_ROOT@', - '--source-root', '@SOURCE_ROOT@', - '--venv-name', 'venv-dnsdist-man-pages', - '--requirements-file', docs_dir / 'requirements.txt', - '--source-directory', docs_dir, - '--target-directory', '@BUILD_ROOT@', - ] + man_pages, - ) + if generated_man_pages.length() != 0 + summary('Generating man pages', true, section: 'Manual Pages') + custom_target( + 'man-pages', + input: man_pages, + output: generated_man_pages, + install: true, + install_dir: join_paths(get_option('mandir'), 'man1'), + command: [ + python, + product_source_dir / docs_dir / 'generate-man-pages.py', + '--build-root', '@BUILD_ROOT@', + '--source-root', '@SOURCE_ROOT@', + '--venv-name', 'venv-dnsdist-man-pages', + '--requirements-file', docs_dir / 'requirements.txt', + '--source-directory', docs_dir, + '--target-directory', '@BUILD_ROOT@', + ] + man_pages, + ) + else + summary('Generating man pages', false, section: 'Manual Pages') + endif endif if dep_systemd_prog.found()