Skip to content

devel Autogen before sep 2010

Jeff Squyres edited this page Sep 9, 2014 · 4 revisions

The role of autogen.sh (prior to September 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.

Related wiki pages

autogen.sh

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:

autogen.sh does the following (in brief):

  1. Traverses the Open MPI source code tree looking for frameworks and components
  2. Decides how to configure each framework and component
  3. Decides how to build each framework and component
  4. 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.

Re-running autogen.sh

Note that you need to re-run autogen.sh (and therefore configure) whenever:

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.

Editing Makefile.am's

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.

Clone this wiki locally