From: Otto Moerbeek Date: Mon, 17 Feb 2025 15:28:43 +0000 (+0100) Subject: Add all '*.rst' files in docs as a dependency. X-Git-Tag: dnsdist-2.0.0-alpha1~48^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fb0df55dc397db87e5523e6c48336ce156d5df0;p=thirdparty%2Fpdns.git Add all '*.rst' files in docs as a dependency. The Meson docs are not a fan of this method, but maintaining that list by hand is too much work and error prone. This does mean that adding existing .rst file to the docs will not be picked up by the dependency checking until you re-setup your build dir. --- diff --git a/meson.build b/meson.build index 65d453c146..e4d946e8db 100644 --- a/meson.build +++ b/meson.build @@ -1125,6 +1125,9 @@ if get_option('unit-tests-backends') endif if python.found() + find_rst_files = run_command(['find', docs_dir, '-name', '*.rst']) + rst_files = find_rst_files.stdout().strip().split('\n') + html_docs = custom_target( 'html-docs', command: [ @@ -1139,6 +1142,7 @@ if python.found() ], output: 'html-docs', console: true, + depend_files: rst_files, ) docs_tarball = custom_target( @@ -1161,6 +1165,7 @@ if python.found() ], output: 'PowerDNS-Authoritative.pdf', console: true, + depend_files: rst_files, ) run_target( diff --git a/pdns/dnsdistdist/meson.build b/pdns/dnsdistdist/meson.build index 414fafded0..c13ef069d0 100644 --- a/pdns/dnsdistdist/meson.build +++ b/pdns/dnsdistdist/meson.build @@ -691,6 +691,9 @@ install_data( ) if python.found() + find_rst_files = run_command(['find', docs_dir, '-name', '*.rst']) + rst_files = find_rst_files.stdout().strip().split('\n') + html_docs = custom_target( 'html-docs', command: [ @@ -705,6 +708,7 @@ if python.found() ], output: 'html-docs', console: true, + depend_files: rst_files, ) docs_tarball = custom_target( @@ -727,6 +731,7 @@ if python.found() ], output: 'dnsdist.pdf', console: true, + depend_files: rst_files, ) run_target( diff --git a/pdns/recursordist/meson.build b/pdns/recursordist/meson.build index 43f583e3fe..c6c4e7a6b5 100644 --- a/pdns/recursordist/meson.build +++ b/pdns/recursordist/meson.build @@ -735,6 +735,9 @@ dep_conf_distfile = custom_target( ) if python.found() + find_rst_files = run_command(['find', docs_dir, '-name', '*.rst']) + rst_files = find_rst_files.stdout().strip().split('\n') + html_docs = custom_target( 'html-docs', command: [ @@ -749,6 +752,7 @@ if python.found() ], output: 'html-docs', console: true, + depend_files: rst_files, ) docs_tarball = custom_target( @@ -771,6 +775,7 @@ if python.found() ], output: 'PowerDNS-Recursor.pdf', console: true, + depend_files: rst_files, ) run_target(