Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Autoconf-based builds for MOM6-examples models
This patch includes Makefiles for building each of the models and supporting libraries in MOM6-examples. Each build now uses autoconf to configure its essential compiler flags, rather than relying on an external mkmf template. Each Makefile is usable on its own; for example the FMS Makefile will build FMS, the ocean_only Makefile will build the ocean-only MOM6, etc. When a Makefile requires a component from another part (such as ocean_only requiring FMS), it now invokes the Makefile of the depedency, rather than trying to orchestrate the entire build on its own. There are still instances of "reaching" into other components. For example, many of the builds use autoconf files in the MOM6 repository. Others use configure scripts from a common directory. And any Makefile dependencies are freely referenced from within the directory tree. But in principle, each of these "externals" can be indepdendently configured and each Makefile can be used as a standalone build. There is a top-level Makefile which builds both symmetric and nonsymmetric versions of each model, as well as supporting libraries. These are placed in a user-defined BUILD directory (default to `build`) which is external to the individual default build directories within the Makefiles of individual components. This top-level Makefile does its best to emulate the output of the existing MRS build system. Assuming we are satisfied with this new approach, we can start to change some of these conventions. There are still many smaller issues which ought to be addressed: - The default MRS build system creates libMOM and libSIS libraries for the coupled builds (ice-ocean and AM2-based). We do not create equivalent libraries. - There are perhaps too many local `configure.XXX.ac` configure script templates floating around. Many are nearly identical. - Reaching into MOM6 for much of the content is not sustainable, and this content should perhaps be moved into MOM6-examples itself. - These Makefiles include some rules for running the models, but this is not yet feature-complete and we are still quite far from replacing MRS for running the tests. (Regression testing would not happen at this level, and would be handled by an even higher Makefile, such as from Gaea-stats).
- Loading branch information