Go to the first, previous, next, last section, table of contents.

Building documentation

Currently Automake provides support for Texinfo and man pages.


If the current directory contains Texinfo source, you must declare it with the `TEXINFOS' primary. Generally Texinfo files are converted into info, and thus the info_TEXINFOS macro is most commonly used here. Note that any Texinfo source file must end in the `.texi' or `.texinfo' extension.

If the `.texi' file @includes `version.texi', then that file will be automatically generated. The file `version.texi' defines three Texinfo macros you can reference: EDITION, VERSION, and UPDATED. The first two hold the version number of your package (but are kept separate for clarity); the last is the date the primary file was last modified. The `version.texi' support requires the mdate-sh program; this program is supplied with Automake and automatically included when automake is invoked with the --add-missing option.

Sometimes an info file actually depends on more than one `.texi' file. For instance, in GNU Hello, `hello.texi' includes the file `gpl.texi'. You can tell Automake about these dependencies using the texi_TEXINFOS variable. Here is how GNU Hello does it:

info_TEXINFOS = hello.texi
hello_TEXINFOS = gpl.texi

By default, Automake requires the file `texinfo.tex' to appear in the same directory as the Texinfo source. However, if you used AC_CONFIG_AUX_DIR in `configure.in' (see section `Finding `configure' Input' in The Autoconf Manual), then `texinfo.tex' is looked for there. Automake supplies `texinfo.tex' if `--add-missing' is given.

If your package has Texinfo files in many directories, you can use the variable TEXINFO_TEX to tell Automake where to find the canonical `texinfo.tex' for your package. The value of this variable should be the relative path from the current `Makefile.am' to `texinfo.tex':

TEXINFO_TEX = ../doc/texinfo.tex

The option `no-texinfo.tex' can be used to eliminate the requirement for `texinfo.tex'. Use of the variable TEXINFO_TEX is preferable, however, because that allows the dvi target to still work.

Automake generates an install-info target; some people apparently use this. By default, info pages are installed by `make install'. This can be prevented via the no-installinfo option.

Man pages

A package can also include man pages (but see the GNU standards on this matter, section `Man Pages' in The GNU Coding Standards.) Man pages are declared using the `MANS' primary. Generally the man_MANS macro is used. Man pages are automatically installed in the correct subdirectory of mandir, based on the file extension. They are not automatically included in the distribution.

By default, man pages are installed by `make install'. However, since the GNU project does not require man pages, many maintainers do not expend effort to keep the man pages up to date. In these cases, the no-installman option will prevent the man pages from being installed by default. The user can still explicitly install them via `make install-man'.

Here is how the documentation is handled in GNU cpio (which includes both Texinfo documentation and man pages):

info_TEXINFOS = cpio.texi
man_MANS = cpio.1 mt.1

Texinfo source and info pages are all considered to be source for the purposes of making a distribution.

Man pages are not currently considered to be source, because it is not uncommon for man pages to be automatically generated. For the same reason, they are not automatically included in the distribution.

Go to the first, previous, next, last section, table of contents.