www.delorie.com/gnu/docs/automake/automake_87.html   search  
Buy GNU books!


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13.4 Staged installs

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.

Support for `DESTDIR' is implemented by coding it directly into the install rules. If your `Makefile.am' uses a local install rule (e.g., install-exec-local) or an install hook, then you must write that code to respect `DESTDIR'.

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003