From fc540b72a668c6ef4196f5501b0d385822e8657e Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Mon, 12 Dec 2016 14:15:40 +0530 Subject: 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 --- mesonbuild/backend/ninjabackend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 3562cf8c3..051682936 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, -- cgit v1.2.3