Go to the first, previous, next, last section, table of contents.
Naturally, Automake handles the details of actually installing your
program once it has been built. All PROGRAMS
, SCRIPTS
,
LIBRARIES
, LISP
, DATA
and HEADERS
are
automatically installed in the appropriate places.
Automake also handles installing any specified info and man pages.
Automake generates separate install-data
and install-exec
targets, in case the installer is installing on multiple machines which
share directory structure--these targets allow the machine-independent
parts to be installed only once. The install
target depends on
both of these targets.
Automake also generates an uninstall
target, an
installdirs
target, and an install-strip
target.
It is possible to extend this mechanism by defining an
install-exec-local
or install-data-local
target. If these
targets exist, they will be run at `make install' time.
Variables using the standard directory prefixes `data', `info', `man', `include', `oldinclude', `pkgdata', or `pkginclude' (e.g. `data_DATA') are installed by `install-data'.
Variables using the standard directory prefixes `bin', `sbin', `libexec', `sysconf', `localstate', `lib', or `pkglib' (e.g. `bin_PROGRAMS') are installed by `install-exec'.
Any variable using a user-defined directory prefix with `exec' in the name (e.g. `myexecbin_PROGRAMS' is installed by `install-exec'. All other user-defined prefixes are installed by `install-data'.
Automake generates support for the `DESTDIR' variable in all install rules. `DESTDIR' is used during the `make install' step to relocate install objects into a staging area. Each object and path is prefixed with the value of `DESTDIR' before being copied into the install area. Here is an example of typical DESTDIR usage:
make DESTDIR=/tmp/staging install
This places install objects in a directory tree built under `/tmp/staging'. If `/gnu/bin/foo' and `/gnu/share/aclocal/foo.m4' are to be installed, the above command would install `/tmp/staging/gnu/bin/foo' and `/tmp/staging/gnu/share/aclocal/foo.m4'.
This feature is commonly used to build install images and packages. For more information, see section `Makefile Conventions' in The GNU Coding Standards.
Go to the first, previous, next, last section, table of contents.