Can't run Makefile.am, what should I do?
These files are used with the Autotools suite. Makefile.am files are compiled to Makefiles using automake.
Have a look to see if there is a configure
script in the directory. If there is, then type:
./configure
If not, then run:
autoreconf
in the directory, which should create the configure
script (you will need to have the Autotools suite installed to run this).
After that, you should have a configure
script that you can run.
After the configure is complete, you should have a normal Makefile in the directory, and will be able to run
make
What has been left out:
- Makefile.am are transformed to Makefile.in using automake.
- Makefile.in are transformed to Makefile by running configure.
Neither of these (Makefile.{am,in}) are supposed to be used with make -f
.
If the tarball already ships with configure, just run that and make. If it does not, run ./autogen.sh
or bootstrap
(*). If that does not exist, use autoreconf
instead.
(*) autogen/bootstrap: A convenience script added by developers that should just call autoreconf
. Unfortunately there are some people that eschew autoreconf and unnecessarily call all the lowlevel commands themselves.
To supplement what has already been said:Search for a script called configure in the project directory. If it is there, building the project will be:
./configure
make
and optionally, to install:
sudo make install
or su -c "make install"
Even if there is no configure script. there might be one autogen.sh. Run this script to generate the configure script and do as above.