The GNU Build System works by generating scripts that have to be later distributed in your distribution file; these include Makefile.ins and configure, among others. Many projects that use it are managed by a version control system (such as CVS), although they don't keep the generated files under revision control (which is a good thing in many scenarios).

When you check out a copy of these sources from the repository, you don't get any of the build scripts you need to build the project on your machine; instead, you have to deal with the task of previously creating them. However, many projects provide a shell script aimed to simplify this task, usually named This script runs automake, autoconf, aclocal and other utilities in the right order to create the required files. But this is a very bad idea. Consider that aclocal will be replaced with something else in the future, thus breaking your scripts.

The solution is named autoreconf, which comes with GNU Autoconf. This program deals with the task of running autoheader, aclocal, automake, autopoint (known as gettextize too) and libtoolize where appropiate to remake the GNU Build System files. Furthermore, it only remakes those files that are older than their predecessors, or those that don't exist. Just try it: run autoreconf -is on a project and see how the files are automagically created.

But... what if you need to run other tools like intltoolize? Then, in this case, it is still good to provide an script. So all it would do is run intltoolize and later run autoreconf.

Just remember to not run any of the tools automatically executed by autoreconf in your script. Anything else is appropiate.

Go to posts index

Comments from the original Blogger-hosted post: