-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
makedep: Include object file dependencies #288
makedep: Include object file dependencies #288
Conversation
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #288 +/- ##
============================================
+ Coverage 37.07% 37.11% +0.04%
============================================
Files 263 263
Lines 73623 73493 -130
Branches 13720 13700 -20
============================================
- Hits 27296 27278 -18
+ Misses 41290 41185 -105
+ Partials 5037 5030 -7
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the change to the normal makefile output, but when debugging is turned on (makedep -d ...
) I think it better to report both found_mods
and found_deps
. Could you add that debugging?
|
I thought |
d37ce6b
to
8ece018
Compare
I just did |
Not quite on-topic, but I noticed that Cray module files are in ALL CAPS ( (Of course a better solution is to take account of the filename,but that's a separate issue...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
The current implementation of makedep contains something like a race condition, where the creation of the .mod and .o files may be in an order which breaks the current dependency tree. Currently, .mod depends on .o, and changes to a module do not trigger rebuilds of dependent source. Rather than try to sort out the rule order, which could even depend on compiler internals, this patch just adds both object and module output files as dependencies, and rebuilds if either changes. We might want to come back to this someday and understand the actual order of rule execution. Thanks to Alistair Adcroft (@adcroft) for proposing this solution.
650e7e3
to
f6db061
Compare
This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/17825. |
The current implementation of makedep contains something like a race condition, where the creation of the .mod and .o files may be in an order which breaks the current dependency tree. Currently, .mod depends on .o, and changes to a module do not trigger rebuilds of dependent source.
Rather than try to sort out the rule order, which could even depend on compiler internals, this patch just adds both object and module output files as dependencies, and rebuilds if either changes.
We might want to come back to this someday and understand the actual order of rule execution.
Thanks to Alistair Adcroft (@adcroft) for proposing this solution.