Skip to content
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

Patch makedep to include C in "externals" #274

Merged
merged 3 commits into from
Dec 9, 2022

Conversation

adcroft
Copy link
Member

@adcroft adcroft commented Dec 9, 2022

Applying makedep to a single shot build of FMS+MOM6 (i.e. skipping the libFMS.a) I found the list of objects was incomplete because the C files were not covered by the module dependencies. makedep figures out the Fortran module dependencies and then has a list of "externals" to cover all the files that don't provide modules. "externals" are always compiled, in lieu of flinting the source code. The main commit simply adds all the C object files to the list of externals. When building via a library, the module dependencies are ignored and everything gets built, which is why this gap was not seen before.

Two other commits refactor the script to follow PEP8 (the first from @marshallward).

@codecov
Copy link

codecov bot commented Dec 9, 2022

Codecov Report

Merging #274 (1a4f4f6) into dev/gfdl (e2ef845) will not change coverage.
The diff coverage is n/a.

❗ Current head 1a4f4f6 differs from pull request most recent head ca6264e. Consider uploading reports for the commit ca6264e to get more accurate results

@@            Coverage Diff            @@
##           dev/gfdl     #274   +/-   ##
=========================================
  Coverage     37.12%   37.12%           
=========================================
  Files           263      263           
  Lines         73434    73434           
  Branches      13674    13674           
=========================================
  Hits          27266    27266           
  Misses        41144    41144           
  Partials       5024     5024           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

marshallward and others added 3 commits December 9, 2022 13:55
This is a first pass to refactoring the makedep script, primarily to
make it PEP8 compliant.
Applying makedep to a single shot build of FMS+MOM6 (i.e. skipping the libFMS.a) I found the list of objects was incomplete because the C files were not covered by the module dependencies. makedep figures out the Fortran module dependencies and then has a list of "externals" to cover all the files that don't provide modules. "externals" are always compiled, in lieu of flinting the source code. This commit simply adds all the C object files to the list of externals. When building a library, the module dependencies are ignore and everything gets built, which is why this gap was not seen before.
Fixes all remaining PEP8 violations in ac/makedep (using line length = 132).
@marshallward marshallward merged commit 9bc8772 into NOAA-GFDL:dev/gfdl Dec 9, 2022
@adcroft adcroft deleted the patch-makedep-c-externals branch June 26, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants