diff options
Diffstat (limited to 'mesonbuild/backend/ninjabackend.py')
-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 076940b..f7e84dc 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -1698,12 +1698,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) |