Published on

Building a project that has build files with the am extension

Authors

Today I had to workout how to build a project that had .am files in it. The am extension stands for Automake which is the tool you need to bootstrap the build process for this project. In my case the project had a file called Makefile.am in the root of the project. To build a project like this:

  • Go to the root of the project
  • Create the associated configure script by running:
autoreconf --install
  • Make a temporary directory to hold the generated make file in (the name of this directory is irrelevant):
mkdir _build && cd _build

Note: If you are doing the above in a docker container mkdir _build && cd $_ does not work - you need to specify the exact directory as demonstrated above.

  • Run the configuration from the _build directory to generate the make file and other meta data needed for the build:
../configuration
  • Finally make and install:
    • Omit the sudo from the last command if this is being run from a docker container
make
sudo make install

The combined set of commands ran are:

cd path/where/your/repo/will/go
git clone theRepoYouWant.git
cd theRepoYouWant
autoreconf --install
mkdir _build && cd _build
../configuration
make
make install
echo "Done!"