diff options
author | Thomas Weißschuh <thomas@t-8ch.de> | 2023-03-06 19:11:07 +0000 |
---|---|---|
committer | Dudemanguy <random342@airmail.cc> | 2023-03-24 02:18:39 +0000 |
commit | 4827fc2907f486175c051a3eaa175b1af54e8821 (patch) | |
tree | b1a7272791a948fa82fe0426f48daf58b71d3217 /meson.build | |
parent | 707554324af40db53e2f342bce3e454d33779af8 (diff) | |
download | mpv-4827fc2907f486175c051a3eaa175b1af54e8821.tar.bz2 mpv-4827fc2907f486175c051a3eaa175b1af54e8821.tar.xz |
meson: rst2pdf handle dependency file
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 12 |
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') ) |