aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorRalf Gommers <ralf.gommers@gmail.com>2021-06-12 21:39:59 +0200
committerDylan Baker <dylan@pnwbakers.com>2021-06-14 09:36:28 -0700
commitbc6df45663564b0be1faead61a07f224da1b387f (patch)
tree220006b1e0cf3d1a794ea2a28c1ce1d7e9183920 /mesonbuild/backend/ninjabackend.py
parentfc93c07e9ed47d2701ebe99e2e45f1d878b42078 (diff)
downloadmeson-bc6df45663564b0be1faead61a07f224da1b387f.zip
meson-bc6df45663564b0be1faead61a07f224da1b387f.tar.gz
meson-bc6df45663564b0be1faead61a07f224da1b387f.tar.bz2
Fix issue with generated Cython code in a subdir
This is a follow-up to gh-8706, which contained the initial fix to ninjabackend.py but somehow lost it. This re-applies the fix and adds a test for it. Without the fix, the error is: ninja: error: 'ct2.pyx', needed by 'libdir/ct2.cpython-39-x86_64-linux-gnu.so.p/ct2.pyx.c', missing and no known rule to make it
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index db50f6a..688149b 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1583,6 +1583,8 @@ int dummy;
for ssrc in gen.get_outputs():
if isinstance(gen, GeneratedList):
ssrc = os.path.join(self.get_target_private_dir(target) , ssrc)
+ else:
+ ssrc = os.path.join(gen.get_subdir(), ssrc)
if ssrc.endswith('.pyx'):
args = args.copy()
output = os.path.join(self.get_target_private_dir(target), f'{ssrc}.c')