aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/ninjabackend.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2016-12-12 14:15:40 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2016-12-15 04:12:23 +0530
commitfc540b72a668c6ef4196f5501b0d385822e8657e (patch)
treefb99ce20eb1ed86f51dc7e27f793181a48c125df /mesonbuild/backend/ninjabackend.py
parent627faa0d39f1d0f02b72473a056a8fe2c322236a (diff)
downloadmeson-fc540b72a668c6ef4196f5501b0d385822e8657e.zip
meson-fc540b72a668c6ef4196f5501b0d385822e8657e.tar.gz
meson-fc540b72a668c6ef4196f5501b0d385822e8657e.tar.bz2
vala: Fix duplicate output detection
The same vapi or vala might be added multiple times. Don't freak out if that happens. Only freak out if a vapi or vala generated source by the same name and the output same path is added twice. This should never happen anyway since we would refuse to create the target in the first place in theory, but it might happen because of bugs in generators and custom targets. Closes #1084
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-rw-r--r--mesonbuild/backend/ninjabackend.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 3562cf8..0516829 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -951,7 +951,7 @@ int dummy;
else:
srctype = othersgen
# Duplicate outputs are disastrous
- if f in srctype:
+ if f in srctype and srctype[f] is not gensrc:
msg = 'Duplicate output {0!r} from {1!r} {2!r}; ' \
'conflicts with {0!r} from {4!r} {3!r}' \
''.format(f, type(gensrc).__name__, gensrc.name,