MetOffice / MetOffice/lfric_core
Dependencies being lost in current (non-Fab) build system
- Dominant language
- Fortran
- Stars
- 26
- Forks
- 73
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
### Version
main
### Are there any linked Issues or Pull Requests?
_No response_
### What happened?
To simplify things, I am looking at the one specific pair of source files and their build products within the whole of lfric_atm.
The basic problem is that if driver_modedb_mod.f90 is updated, then the first invocation of the build system rebuilds driver_modeldb_mod.mod but it does not rebuild jules_exp_alg_mod.o. If the build is run a second time, then jules_exp_alg_mod.o is built.
The specific dependencies extracted from the dependencies.mk file are:
jules_exp_alg_mod.o : driver_modeldb_mod.mod
driver_modeldb_mod.mod : driver_modeldb_mod.o
There are no dependencies on .f90 files in the dependencies.mk file. I think those dependencies are computed implicitly within the compile.mk file meaning there is an implicit dependency as follows:
driver_modeldb_mod.o : driver_modeldb_mod.f90
My guess is that the two parts of the build are done separately: the driver_modeldb_mod.mod file is updated only if there is a substantive change to the .f90 file. So perhaps this separation between the process means the system does not see the change in the .mod file till after make has completed its analysis?
### Relevant log output
```shell
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.