Skip to content

Commit

Permalink
Add all '*.rst' files in docs as a dependency.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
omoerbeek committed Feb 17, 2025
1 parent 112d834 commit 1fb0df5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -1139,6 +1142,7 @@ if python.found()
],
output: 'html-docs',
console: true,
depend_files: rst_files,
)

docs_tarball = custom_target(
Expand All @@ -1161,6 +1165,7 @@ if python.found()
],
output: 'PowerDNS-Authoritative.pdf',
console: true,
depend_files: rst_files,
)

run_target(
Expand Down
5 changes: 5 additions & 0 deletions pdns/dnsdistdist/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -705,6 +708,7 @@ if python.found()
],
output: 'html-docs',
console: true,
depend_files: rst_files,
)

docs_tarball = custom_target(
Expand All @@ -727,6 +731,7 @@ if python.found()
],
output: 'dnsdist.pdf',
console: true,
depend_files: rst_files,
)

run_target(
Expand Down
5 changes: 5 additions & 0 deletions pdns/recursordist/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand All @@ -749,6 +752,7 @@ if python.found()
],
output: 'html-docs',
console: true,
depend_files: rst_files,
)

docs_tarball = custom_target(
Expand All @@ -771,6 +775,7 @@ if python.found()
],
output: 'PowerDNS-Recursor.pdf',
console: true,
depend_files: rst_files,
)

run_target(
Expand Down

0 comments on commit 1fb0df5

Please sign in to comment.