Node:exec-prefix, Next:, Previous:prefix, Up:Locations



exec-prefix

exec-prefix corresponds to the variable exec-prefix for configure, which passes it on to the Makefile it creates. exec-prefix sets the root installation for host-dependent files as follows:

GNATS user tools
exec-prefix/bin
administrative and support utilities
exec-prefix/libexec/gnats
compiled libraries
exec-prefix/lib

etc...

configure supports several more options which allow you to specify in great detail where different files are installed. The locations given in this appendix do not take into account highly customized installations, but fairly ordinary GNATS installations should be covered by the material here. For a complete list of options accepted by configure, run ./configure --help in the gnats subdirectory of the distribution.

Since most installations are not intended to be distributed around a network, the default value for exec-prefix is the value of prefix, i.e., /usr/local. However, using exec-prefix saves space when you are installing a package on several different platforms for which many files are identical; rather than duplicate them for each host, these files can be shared in a common repository, and you can use symbolic links on each host to find the host-dependent files.

Use exec-prefix in conjunction with prefix to share host-independent files, like libraries and info documents. For example:

   for each host:
configure --prefix=/usr/gnu --exec-prefix=/usr/gnu/H-host
make all install ...

Using this paradigm, all host-dependent binary files are installed into /usr/gnu/H-host/bin, while files which do not depend on the host type for which they were configured are installed into /usr/gnu.

You can then use a different symbolic link for /usr/gnu on each host (/usr is usually specific to a particular machine; it is always specific to a particular architecture).

  on host-1:
ln -s /usr/gnu/H-host-1 /usr/gnu
  on host-2:
ln -s /usr/gnu/H-host-2 /usr/gnu

To the end user, then, placing /usr/gnu/bin in her or his PATH simply works transparently for each host type.

You can change exec-prefix on the command line to configure using

configure --exec-prefix=exec-prefix ...

We recommend that you consult Using configure, before attempting this.