Autoconf: Build dependencies as libraries #1010
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch significantly modifies the Autoconf-based builds to separate external content in
pkg/from the main MOM6 source code.These changes are meant to address the challenges with analysis of source code which is outside of our control. Such content is now built separately, isolating it from the usual MOM6 code requirements.
A secondary benefit is that a submodule checkout is no longer required for ocean-only builds.
The patch includes the following specific changes.
Builds relying on
ac/deps/now build libraries for GibbsSeaWater (libgsw.a) and CVMix (libcvmix.a) alongsidelibFMS.a. This replaces any content placed externally intopkg/.A new macro,
MOM6_FC_CHECK_LIB, improves library detection tests by including support for both subroutines and functions, as well as generic argument lists.It still relies on implicit typing, so only reals and integers are supported. We can hopefully fix this in the future.
Makefiles across the build system (
ac/deps/,.testing/, etc.) have been updated to generate and use the new libraries.These changes are not intended to break existing builds, as summarized below.
src/parameters/CVMix/andTEOS10/are explicitly excluded from the makedep source trees, but the symbolic links topkg/are retained, and existing builds which assume their presence should still work.The legacy
AX_FC_CHECK_LIBmacro has been retained, so that it remains available to any external MOM6-examples builds.The git submodules have not been removed, although the GitHub Actions no longer uses then in testing.
The patch also includes the following related minor modifications.
The GitHub Actions FMS build stages now includes GSW and CVMix
.gitignorefiles are modified to target files produced by the build system, rather than globbing of various incidental files.A non-POSIX shell operation
==inconfigure.achas been replaced.