HowTo use bootstrap, configure and make ================================================================= $Id: AutoTools.txt,v 1.2 2003/09/02 18:04:10 frehe Exp $ Created 2003-08-28 by Peter Andersson Last updated 2003-09-02 by Fredrik Heintz The purpose of this HowTo is to describe when and how to use the utilities bootstrap, configure and make. bootstrap ----------------------------------------------------------------- You should use the bootstrap command when you have changed the configure.ac file or when compiling on a new system or in a different environment. The command generates the configure script. This shell script is also called autogen.sh in GNU distributions. configure ----------------------------------------------------------------- The configure script is generated by bootstrap and is used to check the system environment and with this information, create the correct makefiles used by the command make. configure must be run if configure.ac is changed. configure.ac needs to be changed when you add a new directory with code to your program. There is another utility generated called config.status which instantiates files from templates according to the current configuration, i.e. it generates Makefiles. It's useful if you want to generate Makefiles but haven't changed the configuration. Note: ac stands for autoconf, the autotool that generates the configure script. Older versions also support the suffix .in, so if configure.ac does not exist, look for the file configure.in. * Adding new directories to the release Add your directory in the AC_OUTPUT tag in the configure.ac. make ----------------------------------------------------------------- make should be run everytime you'd like to compile your program. Note: am stands for automake, the autotool that generates the Makefile. * Adding new file(s) to the release Add your new file(s) to the XXX_HEADER and XXX_SOURCE tag in the Makefile.am file. At the end of each line a backslash '\' must be added, except for the last line. The new Makefile will be generated automatically when you run make. Sometimes the Makefile gets corrupted, usually due to a conflict after a cvs update, then you will need to either run configure again or run config.status (both are in the root directory) to generate the Makefiles again. Useful features of make is: * make clean Remove everything that is generated during compilation. If you get strange errors, try make clean and then make again. * make dist (only in root directory) Makes a .tar.gz file for distribution of your project. * make docs (only in root and doc directories) Compiles the documentation of the project.