aboutsummaryrefslogtreecommitdiff
path: root/ninjabackend.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-08-08 14:29:20 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-08-08 14:29:20 +0300
commit1b830c907f5cf5bdb872a02832b0924d2c635276 (patch)
tree1692786a4fb2d87528ddebf4d2704e101b049a5c /ninjabackend.py
parentf3d0778403a989e4bbd0f5fbff332e5df4f584bb (diff)
downloadmeson-1b830c907f5cf5bdb872a02832b0924d2c635276.zip
meson-1b830c907f5cf5bdb872a02832b0924d2c635276.tar.gz
meson-1b830c907f5cf5bdb872a02832b0924d2c635276.tar.bz2
Handle Fortran sources with dependencies to themselves.
Diffstat (limited to 'ninjabackend.py')
-rw-r--r--ninjabackend.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/ninjabackend.py b/ninjabackend.py
index 5cb7705..d7b1cf1 100644
--- a/ninjabackend.py
+++ b/ninjabackend.py
@@ -1012,6 +1012,11 @@ class NinjaBackend(backends.Backend):
raise InvalidArguments('Module %s in file %s not provided by any other source file.' %
(usename, src))
mod_source_file = tdeps[usename]
+ # Check if a source uses a module it exports itself.
+ # Potential bug if multiple targets have a file with
+ # the same name.
+ if mod_source_file == os.path.split(src)[1]:
+ continue
# WORKAROUND, we should set up a file level dependency to the
# module file and mark it as an output of this target. However
# we can't do that as Ninja does not support dependency tracking