aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-12-01 00:31:44 -0500
committerEli Schwartz <eschwartz@archlinux.org>2023-02-10 02:16:53 -0500
commit84dd78e80d7e9db1febf6a0016730e2ab6f7a352 (patch)
tree104c4e9f25aa2f92698999cf9fabe84851281d2b /mesonbuild/backend
parent6ea24ee9e29a03c42665be8f1ec2f9c635fb985a (diff)
downloadmeson-84dd78e80d7e9db1febf6a0016730e2ab6f7a352.zip
meson-84dd78e80d7e9db1febf6a0016730e2ab6f7a352.tar.gz
meson-84dd78e80d7e9db1febf6a0016730e2ab6f7a352.tar.bz2
cython: wire up support for emitting and using depfiles
This solves rebuild issues when e.g. importing a .pxd header from a .pyx file, just like C/C++ source headers. The transpiler needs to run again in this case. This functionality is present in the 3.0.0 alphas of cython, and is also backported to 0.29.33. Fixes #9049
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/ninjabackend.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 619bf7c..92d9bdd 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -2234,10 +2234,14 @@ class NinjaBackend(backends.Backend):
description = 'Compiling Cython source $in'
command = compiler.get_exelist()
- args = ['$ARGS', '$in']
+ depargs = compiler.get_dependency_gen_args('$out', '$DEPFILE')
+ depfile = '$out.dep' if depargs else None
+
+ args = depargs + ['$ARGS', '$in']
args += NinjaCommandArg.list(compiler.get_output_args('$out'), Quoting.none)
self.add_rule(NinjaRule(rule, command + args, [],
description,
+ depfile=depfile,
extra='restat = 1'))
def generate_rust_compile_rules(self, compiler):