diff options
author | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2023-04-03 11:17:59 +0200 |
---|---|---|
committer | Kjell Ahlstedt <kjellahlstedt@gmail.com> | 2023-04-03 11:17:59 +0200 |
commit | 550e91d6c565deb5bf144f8d82f5dbdbeb75f412 (patch) | |
tree | 55bc09fccac3c75671cab4fc2627d9efbcb393b0 | |
parent | 9fc3416a95abca28cb992e4607232a3287e847a1 (diff) | |
download | sigc++-550e91d6c565deb5bf144f8d82f5dbdbeb75f412.tar.gz |
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 9f7627d..e4630fe 100644 --- a/meson.build +++ b/meson.build @@ -137,17 +137,9 @@ if maintainer_mode project_source_root / 'untracked' / 'docs' / 'docs', check: true, ) -else - cmd_py = ''' -import os -import sys -sys.exit(os.path.isfile("@0@")) -'''.format(doc_reference) - 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) + 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. |