aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-01-29 09:29:01 -0500
committerXavier Claessens <xavier.claessens@collabora.com>2021-01-29 10:01:36 -0500
commit46b68d4c83bba705bb520877c7b0bd04c2f8cd5b (patch)
tree776b89e22c2322f387ad834ff7f63bd7c61ac9aa /mesonbuild/modules
parent9eb8b6be2874b343ffa1819a3afc2d4ed355b050 (diff)
downloadmeson-46b68d4c83bba705bb520877c7b0bd04c2f8cd5b.zip
meson-46b68d4c83bba705bb520877c7b0bd04c2f8cd5b.tar.gz
meson-46b68d4c83bba705bb520877c7b0bd04c2f8cd5b.tar.bz2
external_project: Improve logging
Write output of 'make' and 'make install' into log files as well when not verbose.
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/unstable_external_project.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/modules/unstable_external_project.py b/mesonbuild/modules/unstable_external_project.py
index aea8366..891ff75 100644
--- a/mesonbuild/modules/unstable_external_project.py
+++ b/mesonbuild/modules/unstable_external_project.py
@@ -162,12 +162,13 @@ class ExternalProject(InterpreterObject):
def _run(self, step: str, command: T.List[str]):
mlog.log('External project {}:'.format(self.name), mlog.bold(step))
- m = 'Running command: ' + str(command)
+ m = 'Running command ' + str(command) + ' in directory ' + str(self.build_dir) + '\n'
log_filename = Path(mlog.log_dir, '{}-{}.log'.format(self.name, step))
output = None
if not self.verbose:
output = open(log_filename, 'w')
output.write(m + '\n')
+ output.flush()
else:
mlog.log(m)
p, o, e = Popen_safe(command, cwd=str(self.build_dir), env=self.run_env,
@@ -186,6 +187,7 @@ class ExternalProject(InterpreterObject):
'--srcdir', self.src_dir.as_posix(),
'--builddir', self.build_dir.as_posix(),
'--installdir', self.install_dir.as_posix(),
+ '--logdir', mlog.log_dir,
'--make', self.make,
]
if self.verbose: