Pre-built configure script#1131
Conversation
|
I was unable to achieve my true goal of completely eliminating autoconf/automake as a dependency. Although
These could be solved in a few ways:
but I wasn't happy with any of those solutions and it was preventing submission of this work, which is completed and in the right direction. |
4420763 to
a7b9620
Compare
|
I'm having second thoughts about some of the decisions here. It seems more common for a repository codebase to provide a "bootstrap" or "autogen" script to generate |
* A top-level convenience `Makefile` has been added. * `configure.ac` was updated to find `Makefile.in` related to the root directory, rather than some rando path.
The .testing/ Makefile was reworked to use the top-level configure. This prevents much of the redundant copying of configure.ac and m4/ macros.
* The siglongjmp() function name was incorrectly assigned to SETJMP when missing. This patch corrects sets it to SIGLONGJMP. * Restore MAKEDEP_DIRS (formerly SRC_DIRS) so that it can be used to detect file changes, as detected by rwildcard. * Fix path of ac-clean targets * Remove legacy bin/ and mkmf/ dirs from ac/deps/ * Remove top-level .gitignore (`build/` is not a defined output) * Remove legacy ac/m4/ax_fc_check_lib.m4 (previously replaced by mom6_fc_check_lib) * Fix erratic indenting of in MOM6_FC_CHECK_LIB macro * Add license header to MOM6_FC_CHECK_LIB * .gitignore updated to ignore configure, and *not* ignore `build/` or any other hypothetical build directory.
a7b9620 to
7a8a528
Compare
|
I updated this to remove the prebuilt configure, but for all MOM6 build to use the (generated) top-configure. I think that is the right design here. BTW any project assuming the old format will probably need to be modified (e.g. MOM6-examples Makefile builds). Probably won't affect existing regression testing though. |
This PR makes several changes to normalize the autoconf build:
A prebuilt
./configurescript has been added to the top-level.This script is now more general-purpose, and can be shared across all MOM6 builds, including
.testing/and parent repositories likeMOM6-examples/. No more need to copyconfigure.acandm4/into build directories and callingautoconf../configurecontains checks to prevent build in both the top directory and.testing/. This is primarily to prevent clobbering of the existing Makefiles.Much of the
ac/"strangeness" of the older layout has been fixed: We still keep all supporting autoconf content inac/but no longer need to do elaborate directory-hopping to normalize our working directory.Makefile.inwas still using$SRC_DIRSto testMakefile.deprebuilds, even though this has been replaced withMAKEDEP_FLAGS. To fix this, source directories have been separated fromMAKEDEP_FLAGSand moved toMAKEDEP_DIRS. (SRC_DIRSwas also replaced.)A top-level
Makefilehas been added to execute./configureand executeac/deps/Makefileif necessary.The
mom6_fc_check_lib.m4macro now usesm4_normalizeto correctly display more exotic paths. The legacyax_fc_check_lib.m4has also been removed..gitignorecleanups: More targeted output, removal of vague generic targets.A missing
siglongjmpwas incorrectly set toSETJMP. This is now fixed.