Now that all is
compiled, you have to copy the built files to an appropriate place
(usually in one of the sub-directories of
/usr/local
).
make can
usually perform this task. A special target is the target
install
. So, using make install
carries out the installation of the required files.
Usually, the
procedure is described in the INSTALL
or
README
file. But sometimes, the developer has
forgotten to provide one. In that case, you must install everything
yourself.
The executable
files (programs) into the /usr/local/bin
directory.
The libraries
(lib*.so
files) into the
/usr/local/lib
directory.
The headers
(*.h
files) into the
/usr/local/include
directory (be careful not to
delete the originals).
The data files
usually go in /usr/local/share
. If you do not
know the installation procedure, you can try to run the programs
without copying the data files, and to put them at the right place
when it asks you for them (in an error message such as
Cannot open
for
example)./usr/local/share/glloq/data.db
The documentation is a little bit different:
The man
files are
usually put in one of the sub-directories of
/usr/local/man
. Usually, these
files are in troff (or groff) format, and
their extension is a number or the letter
n
. Their name is the name of a
command (for instance, echo.1
). If
the number is N
, copy the file in
/usr/local/man/man<n>
, the same
applies to the n
series man
pages.
The
info
files are put in the directory
/usr/info
or
/usr/local/info
You are finished! Congratulations! You now are ready to compile an entire operating system!
If you have just
installed free software, GNU tar for
instance, and if, when you execute it, another program is started or it
does not work like it did when you tested it directly from the
src
directory, it is a PATH
problem, which finds the programs in a directory before the one where
you have installed the new software. Check by executing type -a
<program>
.
The solution is to
put the installation directory higher in the PATH
and/or to delete or rename the files that were executed when they were
not asked for, and/or rename your new programs (into gtar in
this example) so that there is no more confusion.
You can also make an
alias if the shell allows it (for instance, say that tar
means /usr/local/bin/gtar
).