-
Notifications
You must be signed in to change notification settings - Fork 864
devel Autogen before sep 2010
This wiki page briefly outlines what autogen.sh does in the process of building Open MPI.
NOTE: This page is relevant to versions of Open MPI prior to September 2010 (e.g., version 1.4.x and prior). Newer versions of the Open MPI source base (e.g., the SVN trunk and possibly later versions of the 1.5.x series) are probably more relevant to the most recent version of this wiki page, which can be found here.
Open MPI's top-level autogen.sh script is the boostrap script for configuring and building Open MPI. It is necessary to run autogen.sh in developer checkouts, but is unnecessary to run in official distribution tarballs.
Be sure to read the following first:
- Requirements for building from a developer checkout
- Instructions for how to install the GNU Auto tools (and other random developer-level setup information)
autogen.sh does the following (in brief):
- Traverses the Open MPI source code tree looking for frameworks and components
- Decides how to configure each framework and component
- Decides how to build each framework and component
- Invokes all the proper GNU Auto tools (i.e., Autoconf, Automake, Libtool) to setup Open MPI's configure and build process
Specifically, when autogen.sh traverses OMPI's source tree and decides how to configure and build frameworks and components, it supplements/edits OMPI's top-level configure script with the information that it both finds and decides (yes, that sentence makes sense -- you might need to read it a few times to fully grok it). Hence, autogen.sh discovers frameworks and components, and then incorporates them into the GNU Autoconf / Automake / Libtool process that is used to configure and build Open MPI. This concept is critical to understand when creating new frameworks and components because both frameworks and components have the ability to insert hooks into OMPI's top-level configure script. These hooks can then be invoked at strategic points during OMPI's configuration process.
After autogen.sh has completed successfully, you can invoke the normal "configure; make all install" configure-and-build procedure. Open MPI official distribution tarballs already have autogen.sh invoked back at the factory, so end users only need to invoke the normal "configure; make all install" build procedure.
Note that you need to re-run autogen.sh (and therefore configure) whenever:
- You modify OMPI's top-level configure.ac
- You modify any of OMPI's top-level config/*.m4 scripts
- You modify any framework's configure.m4 file
- You modify any component's configure.m4 file
- You add or remove a component
- You add or remove a framework
The rule of thumb is: if you change anything regarding the configuration scripts or composition of OMPI, you need to re-run autogen.sh and configure, and then re-build the entire OMPI tree.
Note that you do not need to re-run autogen.sh (and therefore configure) if you edit a Makefile.am (or Makefile.include). If you are using GNU Make, you can simply invoke "make" and the Right Magic happens (specifically, the Automake-emitted Makefiles will realize that their corresponding Makefile.am's have been edited, re-run the right bootstrapping commands to re-generate the target Makefile(s), re-load the target Makefile(s), and invoke then invoke the proper build targets). If you are not using GNU Make, you may need to run "make" twice: the first time will rebuild the Makefiles, the second time will run the newly-modified Makefile targets.