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


Other Derived Objects

Automake can handle derived objects which are not C programs. Sometimes the support for actually building such objects must be explicitly supplied, but Automake will still automatically handle installation and distribution.

Executable Scripts

It is possible to define and install programs which are scripts. Such programs are listed using the `SCRIPTS' primary name. Automake doesn't define any dependencies for scripts; the `Makefile.am' should include the appropriate rules.

Automake does not assume that scripts are derived objects; such objects must be deleted by hand (see section What Gets Cleaned).

The automake program itself is a Perl script that is generated at configure time from `automake.in'. Here is how this is handled:

bin_SCRIPTS = automake

Since automake appears in the AC_OUTPUT macro, a target for it is automatically generated.

Script objects can be installed in bindir, sbindir, libexecdir, or pkgdatadir.

Header files

Header files are specified by the `HEADERS' family of variables. Generally header files are not installed, so the noinst_HEADERS variable will be the most used. (7)

All header files must be listed somewhere; missing ones will not appear in the distribution. Often it is clearest to list uninstalled headers with the rest of the sources for a program. See section Building a program. Headers listed in a `_SOURCES' variable need not be listed in any `_HEADERS' variable.

Headers can be installed in includedir, oldincludedir, or pkgincludedir.

Architecture-independent data files

Automake supports the installation of miscellaneous data files using the `DATA' family of variables.

Such data can be installed in the directories datadir, sysconfdir, sharedstatedir, localstatedir, or pkgdatadir.

By default, data files are not included in a distribution. Of course, you can use the `dist_' prefix to change this on a per-variable basis.

Here is how Automake installs its auxiliary data files:

pkgdata_DATA = clean-kr.am clean.am ...

Built sources

Occasionally a file which would otherwise be called `source' (e.g. a C `.h' file) is actually derived from some other file. Such files should be listed in the BUILT_SOURCES variable.

BUILT_SOURCES is actually a bit of a misnomer, as any file which must be created early in the build process can be listed in this variable.

A source file listed in BUILT_SOURCES is created before the other all targets are made. However, such a source file is not compiled unless explicitly requested by mentioning it in some other `_SOURCES' variable.

So, for instance, if you had header files which were created by a script run at build time, then you would list these headers in BUILT_SOURCES, to ensure that they would be built before any other compilations (perhaps ones using these headers) were started.


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