aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mcompile.py
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-02-22 20:11:10 -0500
committerEli Schwartz <eschwartz@archlinux.org>2021-02-23 19:37:04 -0500
commitc7ddde58fd4a57e30fbbd4a9e9c4799b65f3e876 (patch)
treed47593fd7c5aacb3c0998966e1ae9d8edc0cdb69 /mesonbuild/mcompile.py
parent691eb0250a58fa8e63a2cf6b256043a5479c2722 (diff)
downloadmeson-c7ddde58fd4a57e30fbbd4a9e9c4799b65f3e876.zip
meson-c7ddde58fd4a57e30fbbd4a9e9c4799b65f3e876.tar.gz
meson-c7ddde58fd4a57e30fbbd4a9e9c4799b65f3e876.tar.bz2
mcompile: do not pass the builddir to ninja if it is the current directory
Because when you don't specify -C, this logging feels silly: ninja: Entering directory `.
Diffstat (limited to 'mesonbuild/mcompile.py')
-rw-r--r--mesonbuild/mcompile.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/mesonbuild/mcompile.py b/mesonbuild/mcompile.py
index b623dbe..ba1d3cf 100644
--- a/mesonbuild/mcompile.py
+++ b/mesonbuild/mcompile.py
@@ -142,7 +142,9 @@ def get_parsed_args_ninja(options: 'argparse.Namespace', builddir: Path) -> T.Tu
if runner is None:
raise MesonException('Cannot find ninja.')
- cmd = runner + ['-C', builddir.as_posix()]
+ cmd = runner
+ if not builddir.samefile('.'):
+ cmd.extend(['-C', builddir.as_posix()])
# If the value is set to < 1 then don't set anything, which let's
# ninja/samu decide what to do.