]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Add all '*.rst' files in docs as a dependency.
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 17 Feb 2025 15:28:43 +0000 (16:28 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 17 Feb 2025 15:28:43 +0000 (16:28 +0100)
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.

meson.build
pdns/dnsdistdist/meson.build
pdns/recursordist/meson.build

index 65d453c14649617daa38747a197634d58009bc33..e4d946e8db357f988a79ec35ef190173ed6f75df 100644 (file)
@@ -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(
index 414fafded0ef4358ea28137df41e5b07f6ee059b..c13ef069d051d88d944f2b6a789500a0695335ac 100644 (file)
@@ -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(
index 43f583e3fe9688481fff140c8a7ca35200c92357..c6c4e7a6b5cfa26a1d4916aa4132126f17baa107 100644 (file)
@@ -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(