summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2023-03-06 19:11:07 +0000
committerDudemanguy <random342@airmail.cc>2023-03-24 02:18:39 +0000
commit4827fc2907f486175c051a3eaa175b1af54e8821 (patch)
treeb1a7272791a948fa82fe0426f48daf58b71d3217 /meson.build
parent707554324af40db53e2f342bce3e454d33779af8 (diff)
downloadmpv-4827fc2907f486175c051a3eaa175b1af54e8821.tar.bz2
mpv-4827fc2907f486175c051a3eaa175b1af54e8821.tar.xz
meson: rst2pdf handle dependency file
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 11 insertions, 1 deletions
diff --git a/meson.build b/meson.build
index 36bcf19f60..1597543e0a 100644
--- a/meson.build
+++ b/meson.build
@@ -1586,11 +1586,21 @@ endif
rst2pdf = find_program('rst2pdf', required: get_option('pdf-build'))
features += {'pdf-build': rst2pdf.found()}
if features['pdf-build']
+ rst2pdf_help = run_command(
+ rst2pdf, '--help',
+ check: true, capture: true
+ ).stdout()
datadir = get_option('datadir')
custom_target('pdf-manpages',
input: manpage,
output: 'mpv.pdf',
- command: [rst2pdf, '-c', '-b', '1', '--repeat-table-rows', '@INPUT@', '-o', '@OUTPUT@'],
+ command: [
+ docutils_wrapper, rst2pdf,
+ '-c', '-b', '1', '--repeat-table-rows',
+ rst2pdf_help.contains('--record-dependencies') ?
+ ['--record-dependencies', '@DEPFILE@'] : [],
+ '@INPUT@', '-o', '@OUTPUT@'],
+ depfile: 'mpv.pdf.dep',
install: true,
install_dir: join_paths(datadir, 'doc', 'mpv')
)