Next: , Previous: , Up: Invoking libtool   [Contents][Index]

4.4 Install mode

In install mode, libtool interprets most of the elements of mode-args as an installation command beginning with cp, or a BSD-compatible install program.

The following components of mode-args are treated specially:

-inst-prefix-dir inst-prefix-dir

When installing into a temporary staging area, rather than the final prefix, this argument is used to reflect the temporary path, in much the same way automake uses DESTDIR. For instance, if prefix is /usr/local, but inst-prefix-dir is /tmp, then the object will be installed under /tmp/usr/local/. If the installed object is a libtool library, then the internal fields of that library will reflect only prefix, not inst-prefix-dir:

# Directory that this library needs to be installed in:


# Directory that this library needs to be installed in:

inst-prefix is also used to ensure that if the installed object must be relinked upon installation, that it is relinked against the libraries in inst-prefix-dir/prefix, not prefix.

In truth, this option is not really intended for use when calling libtool directly; it is automatically used when libtool --mode=install calls libtool --mode=relink. Libtool does this by analyzing the destination path given in the original libtool --mode=install command and comparing it to the expected installation path established during libtool --mode=link.

Thus, end-users need change nothing, and automake-style make install DESTDIR=/tmp will Just Work(tm) most of the time. For systems where fast installation cannot be turned on, relinking may be needed. In this case, a ‘DESTDIR’ install will fail.

Currently it is not generally possible to install into a temporary staging area that contains needed third-party libraries that are not yet visible at their final location.

The rest of the mode-args are interpreted as arguments to the cp or install command.

The command is run, and any necessary unprivileged post-installation commands are also completed.

Next: , Previous: , Up: Invoking libtool   [Contents][Index]