diff options
author | Bálint Aradi <aradi@uni-bremen.de> | 2017-05-12 14:34:19 +0200 |
---|---|---|
committer | Bálint Aradi <aradi@uni-bremen.de> | 2017-05-12 14:34:19 +0200 |
commit | 540fd2f0e03f949842513a8fbb1ef86c33608fd8 (patch) | |
tree | b37434bcae659592d5d13cc385376ed41856a657 | |
parent | 86ec0d9477c3c7fe313dc250c10929dabc5c6188 (diff) | |
download | meson-540fd2f0e03f949842513a8fbb1ef86c33608fd8.zip meson-540fd2f0e03f949842513a8fbb1ef86c33608fd8.tar.gz meson-540fd2f0e03f949842513a8fbb1ef86c33608fd8.tar.bz2 |
Fix scanning of Fortran sources created during configuration
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 797fb64..e5af9fd 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1693,12 +1693,13 @@ rule FORTRAN_DEP_HACK modre = re.compile(r"\s*module\s+(\w+)", re.IGNORECASE) module_files = {} for s in target.get_sources(): - # FIXME, does not work for generated Fortran sources, - # but those are really rare. I hope. + # FIXME, does not work for Fortran sources generated by + # custom_target() and generator() as those are run after + # the configuration (configure_file() is OK) if not compiler.can_compile(s): continue - filename = os.path.join(self.environment.get_source_dir(), - s.subdir, s.fname) + filename = s.absolute_path(self.environment.get_source_dir(), + self.environment.get_build_dir()) with open(filename) as f: for line in f: modmatch = modre.match(line) |