@@ -37,10 +37,9 @@ macos_darwin_versions = [
37
37
' @0@.@1@' .format(libtool_soversion[0 ] + 1 , libtool_soversion[1 ])
38
38
]
39
39
40
- # Use these instead of meson.source_root() and meson.build_root() in subdirectories.
41
- # source_root() and build_root() are not useful, if this is a subproject.
42
- project_source_root = meson .current_source_dir()
43
- project_build_root = meson .current_build_dir()
40
+ # Source and build root directories of the current (sub)project.
41
+ project_source_root = meson .project_source_root()
42
+ project_build_root = meson .project_build_root()
44
43
45
44
cpp_compiler = meson .get_compiler(' cpp' )
46
45
is_msvc = cpp_compiler.get_id() == ' msvc'
@@ -237,17 +236,9 @@ if maintainer_mode
237
236
project_source_root / ' untracked' / ' docs' ,
238
237
check : true ,
239
238
)
240
- else
241
- cmd_py = '''
242
- import os
243
- import sys
244
- sys.exit(os.path.isfile("@0@"))
245
- ''' .format(doc_reference_py)
246
- file_exists = run_command (python3, ' -c' , cmd_py, check : false ).returncode() != 0
247
- if not file_exists
248
- warning (' Missing files in untracked/. ' + \
249
- ' Enable maintainer-mode if you want to build documentation or create a dist tarball.' )
250
- endif
239
+ elif not import (' fs' ).is_file(doc_reference_py)
240
+ warning (' Missing files in untracked/.\n ' + \
241
+ ' Enable maintainer-mode if you want to build documentation or create a dist tarball.' )
251
242
endif
252
243
253
244
# Check if perl is required and available.
0 commit comments