An Internationalized Software Project With Auto Tools
Prev Revision Control Next

Revision Control

An important question is how to save development steps and how to distribute the source code among the project developers. Usually, revision (or source) control systems are used, like cvs or subversion. They allow each developer and, if configured that way, ordinary users as well, to 'check out' the current source code status. Developers can 'check in' their changes. The history is preserved and can be reconstructed.

An important question is: which files should be set under source control? At least two answers are possible: everything and only the absolute necesary.

Everything is recommended for commercial software devlopement and should include all tools used. This is necesary in order to rebuild a very old release in case of a support request.

The absolute minmum is a good choice in freeware projects, as here usually no support is given. The absolute minumum means, that only those files are checked in, which are manually created or modified. These are, beside all source code files, all files mentioned here, e.g. configure.ac, Makefile.am's, NEWS, README, AUTHORS, ChangeLog and so on. All files automatically gererated, like configure, Makefile.in's, Makefile's, object files, config.h, config.h.in and so on should not go into the source control. On cvs, these files can be made 'invisible', by adding their extensions into an ignore file.

If only the files created or changed manually are checked in into the revision control system, it is important, to give the user a procedure, to generate the other files. This can be done with a script, possibly checked in as well. It is createFromCvs.freebsd called here. The extension shows, that it is for FreeBSD users:
# touch createFromCvs.freebsd
# chmod a+x createFromCvs.freebsd

createFromCvs.freebsd

#!/bin/sh
${ACLOCAL}
${AUTOHEADER}
${AUTOCONF}
${AUTOMAKE} --add-missing

On gentoo linux there exists a wrapper script for each of the autotools, so that the environment variables are not necessary. Therefore for gentoo linux, this script might look like:
# touch createFromCvs.gentoo
# chmod a+x createFromCvs.gentoo

createFromCvs.gentoo

#!/bin/sh
aclocal
autoheader
autoconf
automake --add-missing

This script will grow in the next chapters. The FreeBSD version requires the gnu auto tool variables to be set!

An important note: If files are copied from another system, it might happen, that the system clock of the source is in the future relative to the target system. In this case, 'make' might detect the need to recreate a file. After its creation it might still be older than its dependencies, if they are changed recently on the source system (with a clock running in the future). In this case 'make' might end in an endless loop (not really endless off course: if the target computers clock reaches the creation time of the dependent file, the loop ends. But still a very long lasting loop...). In this case a recusive 'touch' might help:
# find . -name "*" -exec touch {} +
Next the simple project will get a module, which allows to structure the source code.
Prev Home Next
Adding Auto Tool Support Adding a Module