diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2023-03-12 10:13:06 +0100 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2023-03-12 10:21:01 +0100 |
commit | c9580309765629adbbccfd8a4a88654f956e990a (patch) | |
tree | ba4876025512c750db2b07de96774646999d5983 | |
parent | a70449b9c6496c221fce70242a51c619dcd63ad9 (diff) |
meson.build: Simplify if-file-exists test
-rw-r--r-- | meson.build | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/meson.build b/meson.build index 1a7686a..c7a7ebf 100644 --- a/meson.build +++ b/meson.build @@ -176,17 +176,9 @@ if maintainer_mode project_source_root / 'untracked' / 'docs', check: true, ) -else - cmd_py = ''' -import os -import sys -sys.exit(os.path.isfile("@0@")) -'''.format(doc_reference_py) - file_exists = run_command(python3, '-c', cmd_py, check: false).returncode() != 0 - if not file_exists - warning('Missing files in untracked/. ' + \ - 'Enable maintainer-mode if you want to build documentation or create a dist tarball.') - endif +elif not import('fs').is_file(doc_reference_py) + warning('Missing files in untracked/.\n ' + \ + 'Enable maintainer-mode if you want to build documentation or create a dist tarball.') endif # Check if perl is required and available. |