* standards.texi: Import February 14, 2002 version.
* make-stds.texi: Import 2001 version. * Makefile.in (install): Depend on install-info.
This commit is contained in:
parent
c1010a63d8
commit
e3c6baed8a
@ -1,3 +1,7 @@
|
|||||||
|
2002-02-24 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
|
* texinfo/texinfo.tex: Update to version 2002-02-14.08.
|
||||||
|
|
||||||
2002-02-23 Daniel Jacobowitz <drow@mvista.com>
|
2002-02-23 Daniel Jacobowitz <drow@mvista.com>
|
||||||
|
|
||||||
* config.guess: Import from master sources, rev 1.232.
|
* config.guess: Import from master sources, rev 1.232.
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2002-02-24 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
|
* standards.texi: Import February 14, 2002 version.
|
||||||
|
* make-stds.texi: Import 2001 version.
|
||||||
|
|
||||||
2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
|
2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
|
||||||
|
|
||||||
* Makefile.in (install): Depend on install-info.
|
* Makefile.in (install): Depend on install-info.
|
||||||
|
@ -8,6 +8,17 @@
|
|||||||
@cindex conventions for makefiles
|
@cindex conventions for makefiles
|
||||||
@cindex standards for makefiles
|
@cindex standards for makefiles
|
||||||
|
|
||||||
|
@c Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001 Free
|
||||||
|
@c Software Foundation, Inc.
|
||||||
|
|
||||||
|
@c Permission is granted to copy, distribute and/or modify this document
|
||||||
|
@c under the terms of the GNU Free Documentation License, Version 1.1
|
||||||
|
@c or any later version published by the Free Software Foundation;
|
||||||
|
@c with no Invariant Sections, with no
|
||||||
|
@c Front-Cover Texts, and with no Back-Cover Texts.
|
||||||
|
@c A copy of the license is included in the section entitled ``GNU
|
||||||
|
@c Free Documentation License''.
|
||||||
|
|
||||||
This
|
This
|
||||||
@ifinfo
|
@ifinfo
|
||||||
node
|
node
|
||||||
@ -21,6 +32,8 @@ chapter
|
|||||||
@end ifclear
|
@end ifclear
|
||||||
@end iftex
|
@end iftex
|
||||||
describes conventions for writing the Makefiles for GNU programs.
|
describes conventions for writing the Makefiles for GNU programs.
|
||||||
|
Using Automake will help you write a Makefile that follows these
|
||||||
|
conventions.
|
||||||
|
|
||||||
@menu
|
@menu
|
||||||
* Makefile Basics:: General Conventions for Makefiles
|
* Makefile Basics:: General Conventions for Makefiles
|
||||||
@ -79,7 +92,7 @@ foo.1 : foo.man sedscript
|
|||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
will fail when the build directory is not the source directory, because
|
will fail when the build directory is not the source directory, because
|
||||||
@file{foo.man} and @file{sedscript} are in the the source directory.
|
@file{foo.man} and @file{sedscript} are in the source directory.
|
||||||
|
|
||||||
When using GNU @code{make}, relying on @samp{VPATH} to find the source
|
When using GNU @code{make}, relying on @samp{VPATH} to find the source
|
||||||
file will work in the case where there is a single dependency file,
|
file will work in the case where there is a single dependency file,
|
||||||
@ -247,9 +260,10 @@ Every Makefile should define the variable @code{INSTALL}, which is the
|
|||||||
basic command for installing a file into the system.
|
basic command for installing a file into the system.
|
||||||
|
|
||||||
Every Makefile should also define the variables @code{INSTALL_PROGRAM}
|
Every Makefile should also define the variables @code{INSTALL_PROGRAM}
|
||||||
and @code{INSTALL_DATA}. (The default for each of these should be
|
and @code{INSTALL_DATA}. (The default for @code{INSTALL_PROGRAM} should
|
||||||
@code{$(INSTALL)}.) Then it should use those variables as the commands
|
be @code{$(INSTALL)}; the default for @code{INSTALL_DATA} should be
|
||||||
for actual installation, for executables and nonexecutables
|
@code{$@{INSTALL@} -m 644}.) Then it should use those variables as the
|
||||||
|
commands for actual installation, for executables and nonexecutables
|
||||||
respectively. Use these variables as follows:
|
respectively. Use these variables as follows:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
@ -280,26 +294,28 @@ installed.
|
|||||||
Installation directories should always be named by variables, so it is
|
Installation directories should always be named by variables, so it is
|
||||||
easy to install in a nonstandard place. The standard names for these
|
easy to install in a nonstandard place. The standard names for these
|
||||||
variables are described below. They are based on a standard filesystem
|
variables are described below. They are based on a standard filesystem
|
||||||
layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
|
layout; variants of it are used in SVR4, 4.4BSD, GNU/Linux, Ultrix v4,
|
||||||
other modern operating systems.
|
and other modern operating systems.
|
||||||
|
|
||||||
These two variables set the root for the installation. All the other
|
These two variables set the root for the installation. All the other
|
||||||
installation directories should be subdirectories of one of these two,
|
installation directories should be subdirectories of one of these two,
|
||||||
and nothing should be directly installed into these two directories.
|
and nothing should be directly installed into these two directories.
|
||||||
|
|
||||||
@table @samp
|
@table @code
|
||||||
@item prefix
|
@item prefix
|
||||||
|
@vindex prefix
|
||||||
A prefix used in constructing the default values of the variables listed
|
A prefix used in constructing the default values of the variables listed
|
||||||
below. The default value of @code{prefix} should be @file{/usr/local}.
|
below. The default value of @code{prefix} should be @file{/usr/local}.
|
||||||
When building the complete GNU system, the prefix will be empty and
|
When building the complete GNU system, the prefix will be empty and
|
||||||
@file{/usr} will be a symbolic link to @file{/}.
|
@file{/usr} will be a symbolic link to @file{/}.
|
||||||
(If you are using Autoconf, write it as @samp{@@prefix@@}.)
|
(If you are using Autoconf, write it as @samp{@@prefix@@}.)
|
||||||
|
|
||||||
Running @samp{make install} with a different value of @code{prefix}
|
Running @samp{make install} with a different value of @code{prefix} from
|
||||||
from the one used to build the program should @var{not} recompile
|
the one used to build the program should @emph{not} recompile the
|
||||||
the program.
|
program.
|
||||||
|
|
||||||
@item exec_prefix
|
@item exec_prefix
|
||||||
|
@vindex exec_prefix
|
||||||
A prefix used in constructing the default values of some of the
|
A prefix used in constructing the default values of some of the
|
||||||
variables listed below. The default value of @code{exec_prefix} should
|
variables listed below. The default value of @code{exec_prefix} should
|
||||||
be @code{$(prefix)}.
|
be @code{$(prefix)}.
|
||||||
@ -310,20 +326,22 @@ machine-specific files (such as executables and subroutine libraries),
|
|||||||
while @code{$(prefix)} is used directly for other directories.
|
while @code{$(prefix)} is used directly for other directories.
|
||||||
|
|
||||||
Running @samp{make install} with a different value of @code{exec_prefix}
|
Running @samp{make install} with a different value of @code{exec_prefix}
|
||||||
from the one used to build the program should @var{not} recompile the
|
from the one used to build the program should @emph{not} recompile the
|
||||||
program.
|
program.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
Executable programs are installed in one of the following directories.
|
Executable programs are installed in one of the following directories.
|
||||||
|
|
||||||
@table @samp
|
@table @code
|
||||||
@item bindir
|
@item bindir
|
||||||
|
@vindex bindir
|
||||||
The directory for installing executable programs that users can run.
|
The directory for installing executable programs that users can run.
|
||||||
This should normally be @file{/usr/local/bin}, but write it as
|
This should normally be @file{/usr/local/bin}, but write it as
|
||||||
@file{$(exec_prefix)/bin}.
|
@file{$(exec_prefix)/bin}.
|
||||||
(If you are using Autoconf, write it as @samp{@@bindir@@}.)
|
(If you are using Autoconf, write it as @samp{@@bindir@@}.)
|
||||||
|
|
||||||
@item sbindir
|
@item sbindir
|
||||||
|
@vindex sbindir
|
||||||
The directory for installing executable programs that can be run from
|
The directory for installing executable programs that can be run from
|
||||||
the shell, but are only generally useful to system administrators. This
|
the shell, but are only generally useful to system administrators. This
|
||||||
should normally be @file{/usr/local/sbin}, but write it as
|
should normally be @file{/usr/local/sbin}, but write it as
|
||||||
@ -331,6 +349,7 @@ should normally be @file{/usr/local/sbin}, but write it as
|
|||||||
(If you are using Autoconf, write it as @samp{@@sbindir@@}.)
|
(If you are using Autoconf, write it as @samp{@@sbindir@@}.)
|
||||||
|
|
||||||
@item libexecdir
|
@item libexecdir
|
||||||
|
@vindex libexecdir
|
||||||
@comment This paragraph adjusted to avoid overfull hbox --roland 5jul94
|
@comment This paragraph adjusted to avoid overfull hbox --roland 5jul94
|
||||||
The directory for installing executable programs to be run by other
|
The directory for installing executable programs to be run by other
|
||||||
programs rather than by users. This directory should normally be
|
programs rather than by users. This directory should normally be
|
||||||
@ -623,7 +642,8 @@ the installation commands. @xref{Install Command Categories}.
|
|||||||
|
|
||||||
@item install-strip
|
@item install-strip
|
||||||
Like @code{install}, but strip the executable files while installing
|
Like @code{install}, but strip the executable files while installing
|
||||||
them. In many cases, the definition of this target can be very simple:
|
them. In simple cases, this target can use the @code{install} target in
|
||||||
|
a simple way:
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
install-strip:
|
install-strip:
|
||||||
@ -631,6 +651,14 @@ install-strip:
|
|||||||
install
|
install
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
|
But if the package installs scripts as well as real executables, the
|
||||||
|
@code{install-strip} target can't just refer to the @code{install}
|
||||||
|
target; it has to strip the executables but not the scripts.
|
||||||
|
|
||||||
|
@code{install-strip} should not strip the executables in the build
|
||||||
|
directory which are being copied for installation. It should only strip
|
||||||
|
the copies that are installed.
|
||||||
|
|
||||||
Normally we do not recommend stripping an executable unless you are sure
|
Normally we do not recommend stripping an executable unless you are sure
|
||||||
the program has no bugs. However, it can be reasonable to install a
|
the program has no bugs. However, it can be reasonable to install a
|
||||||
stripped executable for actual execution while saving the unstripped
|
stripped executable for actual execution while saving the unstripped
|
||||||
@ -745,7 +773,7 @@ The easiest way to do this is to create a subdirectory appropriately
|
|||||||
named, use @code{ln} or @code{cp} to install the proper files in it, and
|
named, use @code{ln} or @code{cp} to install the proper files in it, and
|
||||||
then @code{tar} that subdirectory.
|
then @code{tar} that subdirectory.
|
||||||
|
|
||||||
Compress the tar file file with @code{gzip}. For example, the actual
|
Compress the tar file with @code{gzip}. For example, the actual
|
||||||
distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}.
|
distribution file for GCC version 1.40 is called @file{gcc-1.40.tar.gz}.
|
||||||
|
|
||||||
The @code{dist} target should explicitly depend on all non-source files
|
The @code{dist} target should explicitly depend on all non-source files
|
||||||
@ -793,6 +821,19 @@ installdirs: mkinstalldirs
|
|||||||
$(mandir)
|
$(mandir)
|
||||||
@end smallexample
|
@end smallexample
|
||||||
|
|
||||||
|
@noindent
|
||||||
|
or, if you wish to support @env{DESTDIR},
|
||||||
|
|
||||||
|
@smallexample
|
||||||
|
# Make sure all installation directories (e.g. $(bindir))
|
||||||
|
# actually exist by making them if necessary.
|
||||||
|
installdirs: mkinstalldirs
|
||||||
|
$(srcdir)/mkinstalldirs \
|
||||||
|
$(DESTDIR)$(bindir) $(DESTDIR)$(datadir) \
|
||||||
|
$(DESTDIR)$(libdir) $(DESTDIR)$(infodir) \
|
||||||
|
$(DESTDIR)$(mandir)
|
||||||
|
@end smallexample
|
||||||
|
|
||||||
This rule should not modify the directories where compilation is done.
|
This rule should not modify the directories where compilation is done.
|
||||||
It should do nothing but create installation directories.
|
It should do nothing but create installation directories.
|
||||||
@end table
|
@end table
|
||||||
|
1151
etc/standards.texi
1151
etc/standards.texi
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user