Install into the right place for cross
[binutils-gdb.git] / standards.texi
index 392b89e0345d1e6aef1219220d0d50d8f1edc30b..246921c408871e818ae55017159168211a6b98ac 100644 (file)
@@ -34,7 +34,7 @@ by the Free Software Foundation.
 @sp 10
 @titlefont{GNU Coding Standards}
 @author{Richard Stallman}
-@author{last updated 21 April 1992}
+@author{last updated 16 May 1992}
 @c Note date also appears below.
 @page
 
@@ -57,16 +57,10 @@ by Free Software Foundation.
 @end titlepage
 
 @ifinfo
-@format
-START-INFO-DIR-ENTRY
-* standards: (standards.info). The GNU coding standards.
-END-INFO-DIR-ENTRY
-@end format
-
 @node Top, Reading Non-Free Code, (dir), (dir)
 @top Version
 
-Last updated 21 April 1992.
+Last updated 16 May 1992.
 @c Note date also appears above.
 @end ifinfo
 
@@ -297,16 +291,23 @@ the file names where they should reside for actual use.  If there is a
 simple test to verify that a program is properly installed then run that
 test.
 
+Use @samp{-} before any command for installing a man page, so that
+@code{make} will ignore any errors.  This is in case there are systems
+that don't have the Unix man page documentation system installed.
+
 @item clean
 Delete all files from the current directory that are normally created by
 building the program.  Don't delete the files that record the
 configuration.  Also preserve files that could be made by building, but
 normally aren't because the distribution comes with them.
 
+Delete @file{.dvi} files here if they are not part of the distribution.
+
 @item distclean
 Delete all files from the current directory that are created by
-configuring or building the program.  This should leave only the files
-that would be in the distribution.
+configuring or building the program.  If you have unpacked the source
+and built the program without creating any other files, @samp{make
+distclean} should leave only the files that were in the distribution.
 
 @item mostlyclean
 Like @samp{clean}, but may refrain from deleting a few files that people
@@ -394,37 +395,52 @@ easy to install in a nonstandard place.  The standard names for these
 variables are:
 
 @table @samp
+@item prefix
+A prefix used in constructing the default values of the variables listed
+below.  The default value of @code{prefix} should be @file{/usr/local}
+(at least for now).
+
+@item exec_prefix
+A prefix used in constructing the default values of the some of the
+variables listed below.  The default value of @code{exec_prefix} should
+be @code{$(prefix)}.
+
+Generally, @code{$(exec_prefix)} is used for directories that contain
+machine-specific files (such as executables and subroutine libraries),
+while @code{$(prefix)} is used directly for other directories.
+
 @item bindir
 The directory for installing executable programs that users can run.
-This should normally be @file{/usr/local/bin}, but it should be based on
-the value of @code{$(prefix)}.
+This should normally be @file{/usr/local/bin}, but it should be written
+as @file{$(exec_prefix)/bin}.
+
+@item libdir
+The directory for installing executable files to be run by the program
+rather than by users.  Object files and libraries of object code should
+also go in this directory.  The idea is that this directory is used for
+files that pertain to a specific machine architecture, but need not be
+in the path for commands.  The value of @code{libdir} should normally be
+@file{/usr/local/lib}, but it should be written as
+@file{$(exec_prefix)/lib}.
 
 @item datadir
 The directory for installing read-only data files which the programs
 refer to while they run.  This directory is used for files which are
 independent of the type of machine being used.  This should normally be
-@file{/usr/local/lib}, but it should be based on the value of
-@code{$(prefix)}.
+@file{/usr/local/lib}, but it should be written as
+@file{$(prefix)/lib}.
 
 @item statedir
 The directory for installing data files which the programs modify while
 they run.  These files should be independent of the type of machine
 being used, and it should be possible to share them among machines at a
 network installation.  This should normally be @file{/usr/local/lib},
-but it should be based on the value of @code{$(prefix)}.
-
-@item libdir
-The directory for installing executable files to be run by the program
-rather than by users.  Object files and libraries of object code should
-also go in this directory.  The idea is that this directory is used for
-files that pertain to a specific machine architecture.  This should
-normally be @file{/usr/local/lib}, but it should be based on the value of
-@code{$(prefix)}.
+but it should be written as @file{$(prefix)/lib}.
 
 @item includedir
 The directory for installing @samp{#include} header files to be included
 by user programs.  This should normally be @file{/usr/local/include},
-but it should be based on the value of @code{$(prefix)}.
+but it should be written as @file{$(prefix)/include}.
 
 Most compilers other than GCC do not look for header files in
 @file{/usr/local/include}.  So installing the header files this way is
@@ -466,17 +482,12 @@ a period followed by the appropriate digit.
 
 @item infodir
 The directory for installing the info files for this package.  By
-default, it should be @file{/usr/local/info}, but it should be based on the
-value of @code{$(prefix)}.
+default, it should be @file{/usr/local/info}, but it should be written
+as @file{$(prefix)/info}.
 
 @item srcdir
 The directory for the sources being compiled.  The value of this
 variable is normally inserted by the @code{configure} shell script.
-
-@item prefix
-A prefix used in constructing the default values of the variables listed
-above.  The default value of @code{prefix} should be @file{/usr/local}
-(at least for now).
 @end table
 
 For example:
@@ -485,13 +496,15 @@ For example:
 # Common prefix for installation directories.
 # NOTE: This directory must exist when you start installation.
 prefix = /usr/local
+exec_prefix = $(prefix)
 # Directory in which to put the executable for the command `gcc'
-bindir = $(prefix)/bin
+bindir = $(exec_prefix)/bin
 # Directory in which to put the directories used by the compiler.
-libdir = $(prefix)/lib
+libdir = $(exec_prefix)/lib
+# Directory in which to put the Info files.
+infodir = $(prefix)/info
 @end example
 
-
 @node Configuration
 @chapter How Configuration Should Work
 
@@ -560,7 +573,7 @@ For example, a Sun 3 might be @samp{m68k-sun-sunos4.1}.
 
 The @code{configure} script needs to be able to decode all plausible
 alternatives for how to describe a machine.  Thus, @samp{sun3-sunos4.1}
-would be a valid alias.  So would @samp{sun3-bsd4.2}, since Sunos is
+would be a valid alias.  So would @samp{sun3-bsd4.2}, since SunOS is
 basically @sc{BSD} and no other @sc{BSD} system is used on a Sun.  For many
 programs, @samp{vax-dec-ultrix} would be an alias for
 @samp{vax-dec-bsd}, simply because the differences between Ultrix and
@@ -1067,12 +1080,12 @@ for data that will not be changed.
 Try to avoid low-level interfaces to obscure Unix data structures (such
 as file directories, utmp, or the layout of kernel memory), since these
 are less likely to work compatibly.  If you need to find all the files
-in a directory, use @code{readdir} or some other high-level interface.  These
-will be supported compatibly by GNU.
+in a directory, use @code{readdir} or some other high-level interface.
+These will be supported compatibly by GNU.
 
-By default, the GNU system will provide the signal handling
-functions of @sc{BSD} and of @sc{POSIX}.  So GNU software should be
-written to use these.
+By default, the GNU system will provide the signal handling functions of
+@sc{BSD} and of @sc{POSIX}.  So GNU software should be written to use
+these.
 
 In error checks that detect ``impossible'' conditions, just abort.
 There is usually no point in printing any message.  These checks
@@ -1310,10 +1323,15 @@ name on MS-DOG consists of up to 8 characters, optionally followed by a
 period and up to three characters.  MS-DOG will truncate extra
 characters both before and after the period.  Thus,
 @file{foobarhacker.c} and @file{foobarhacker.o} are not ambiguous; they
-are truncated to @file{foobarhac.c} and @file{foobarhac.o}, which are
+are truncated to @file{foobarha.c} and @file{foobarha.o}, which are
 distinct.
 
 Include in your distribution a copy of the @file{texinfo.tex} you used
 to test print any @file{*.texinfo} files.
 
+Likewise, if your program uses small GNU software packages like regex,
+getopt, obstack, or termcap, include them in the distribution file.
+Leaving them out would make the distribution file a little smaller at
+the expense of possible inconvenience to a user who doesn't know what
+other files to get.
 @bye