summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjellahlstedt@gmail.com>2023-04-03 11:58:03 +0200
committerKjell Ahlstedt <kjellahlstedt@gmail.com>2023-04-03 11:58:03 +0200
commit1bf39ce0c79fc2e2d84b0129a4222e6fa64d5ba5 (patch)
tree5fa30481b5e161e6e396731b9063336620040d9b
parentc65a8831c57c245208cfc14b43e9bc6c3534ab38 (diff)
downloadsigc++-1bf39ce0c79fc2e2d84b0129a4222e6fa64d5ba5.tar.gz
meson.build: Simplify if-file-exists test
-rw-r--r--meson.build12
1 files changed, 2 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 189c442..077605b 100644
--- a/meson.build
+++ b/meson.build
@@ -134,16 +134,8 @@ 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)
- file_exists = run_command(python3, '-c', cmd_py, check: false).returncode() != 0
- if not file_exists
- warning('Missing files in untracked/. You may have to enable maintainer-mode.')
- endif
+elif not import('fs').is_file(doc_reference)
+ warning('Missing files in untracked/. You may have to enable maintainer-mode.')
endif
# Check if perl is required and available.