f78
Variables for Installation Directories
When building the complete GNU system, the prefix will be empty and
Generally,
Executable programs are installed in one of the following directories.
Data files used by the program during its execution are divided into
categories in two ways.
Some files are normally modified by programs; others are never normally
modified (though users may edit some of these).
Some files are architecture-independent and can be shared by all machines at a
site; some are architecture-dependent and can be shared only by machines of
the same kind and operating system; others may never be shared between two
machines.
This makes for six different possibilities. However, we want to discourage the
use of architecture-dependent files, aside from of object files and libraries.
It is much cleaner to make other data files architecture-independent, and it
is generally not hard.
Therefore, the following are the variables makefiles should use to specify
directories.
Do not install executables in this directory (they probably belong in
Most compilers other than GCC do not look for header files in
The Makefile commands should check whether the value of
Unix-style
Warning:
Write a manual in Texinfo instead.
And finally, you should set the following variable:
Use the following for example.
Do not expect the user to include the subdirectory name in the value of any of
the variables previously discussed. The idea of having a uniform set of
variable names for installation directories is to enable the user to specify the
exact same values for several different GNU packages. In order for this to be useful, all the packages must be designed
so that they will work sensibly when the user does so.
A prefix used in constructing the default values of the variables listed in
the following discussions for installing directories. The default value of prefix should be /usr/local
A prefix used in constructing the default values of some of the variables
listed in the following discussions for installing directories. The default value
of exec_prefix should be \$(prefix).
The directory for installing executable programs users run. This should
normally be /usr/local/bin but write it as \$(exec_prefix)/bin.
The directory for installing executable programs that can be run from the
shell but are only generally useful to system administrators. This should normally
be /usr/local/sbin but write it as \$(exec_prefix)/sbin.
The directory for installing executable programs to be run by other programs
rather than by users. This directory should normally be /usr/local/libexec, but write it as \$(exec_prefix)/libexec.
The directory for installing read-only architecture indepen-dent data files.
This should normally be /usr/local/share, but write it as \$(prefix)/share. As a special exception, see \$(infodir) and \$(includedir) in the following discussions for them.
The directory for installing read-only data files that pertain to a single
machinethat is to say, files for configuring a host. Mailer and network
configuration files, /etc/passwd, and so forth belong here. All the files in this directory should be
ordinary ASCII text files. This directory should normally be /usr/local/etc, but write it as \$(prefix)/etc.
The directory for installing architecture-independent data files which the
programs modify while they run. This should normally be /usr/local/com, but write it as \$(prefix)/com.
The directory for installing data files which the programs modify while they
run, and that pertain to one specific machine. Users should never need to modify
files in this directory to configure the packages operation; put such
configu-ration information in separate files that go in datadir or \$(sysconfdir). \$(localstatedir) should normally be /usr/local/var, but write it as \$(prefix)/var.
The directory for object files and libraries of object code. Do not install
executables here, they probably be-long in \$(libexecdir) instead. The value of libdir should normally be /usr/local/lib, but write it as \$(exec_prefix)/lib.
The directory for installing the Info files for this package. By default, it
should be /usr/local/info, but it should be written as \$(prefix)/info.
The directory for installing header files to be included by user programs with
the C #include preprocessor directive. This should normally be /usr/local/include, but write it as \$(prefix)/include.
The directory for installing #include header files for use with compilers other than GCC. This should normally be /usr/include.
The directory for installing the man pages (if any) for this package. It
should include the suffix for the proper section of the documentationusually 1 for a utility. It will nor-mally be /usr/local/man/man1 but you should write it as \$(prefix)/man/man1.
The directory for installing section 1 man pages.
The directory for installing section 2 man pages.
Use these names instead of mandir if the package needs to install man pages in more than one section of the documentation.
Dont make the primary documentation for any GNU software be a
The file name extension for the installed man page. This should contain a period followed by the appropriate digit; it
should normally be .1.
The file name extension for installed section 1 man pages.
The file name extension for installed section 2 man pages.
Use these names instead of manext if the package needs to install man pages in more than one section of the documentation.
The directory for the sources being compiled. The value of this variable is
normally inserted by the configure shell script.
# NOTE: This directory must exist when you start the install. prefix =
/usr/local
exec_prefix = $(prefix)
# Where to put the executable for the command gcc.
bindir = $(exec_prefix)/bin
# Where to put the directories used by the compiler.
libexecdir = $(exec_prefix)/libexec
# Where to put the Info files.
infodir = $(prefix)/info