summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Duret-Lutz <adl@gnu.org>2004-04-25 10:01:36 +0000
committerAlexandre Duret-Lutz <adl@gnu.org>2004-04-25 10:01:36 +0000
commitbe4f38213494cbbca0c78cc547adea016d7f6128 (patch)
tree91e8462aeeab4b422223b55b50aaf6272ea45b5b
parentd4766765ac140aa1495502276c04afe6b1d5a1af (diff)
downloadautomake-be4f38213494cbbca0c78cc547adea016d7f6128.tar.gz
* doc/automake.texi (Headers): Revamp.
-rw-r--r--ChangeLog4
-rw-r--r--doc/automake.texi63
2 files changed, 49 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index f1974116a..8d060ae24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-04-25 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * doc/automake.texi (Headers): Revamp.
+
2004-04-24 Alexandre Duret-Lutz <adl@gnu.org>
* lib/am/tags.am (TAGS): Pass `.' to Exuberant Ctags if
diff --git a/doc/automake.texi b/doc/automake.texi
index fb96fc1f0..4c3b58fbd 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -4224,30 +4224,57 @@ Scripts that need not being installed can be listed in
@cindex Primary variable, HEADERS
@vindex noinst_HEADERS
-
-Header files are specified by the @samp{HEADERS} family of variables.
-Generally header files are not installed, so the @code{noinst_HEADERS}
-variable will be the most used. @footnote{However, for the case of a
-non-installed header file that is actually used by a particular program,
-we recommend listing it in the program's @samp{_SOURCES} variable
-instead of in @code{noinst_HEADERS}. We believe this is more clear.}
-@vindex HEADERS
-
-All header files must be listed somewhere; missing ones will not appear
-in the distribution. Often it is clearest to list uninstalled headers
-with the rest of the sources for a program. @xref{A Program}. Headers
-listed in a @samp{_SOURCES} variable need not be listed in any
-@samp{_HEADERS} variable.
-
@cindex HEADERS, installation directories
@cindex Installing headers
-
@vindex include_HEADERS
@vindex oldinclude_HEADERS
@vindex pkginclude_HEADERS
-Headers can be installed in @code{includedir}, @code{oldincludedir}, or
-@code{pkgincludedir}.
+
+Header files that must be installed are specified by the
+@samp{HEADERS} family of variables. Headers can be installed in
+@code{includedir}, @code{oldincludedir}, @code{pkgincludedir} or any
+other directory you may have defined (@pxref{Uniform}). For instance
+
+@example
+include_HEADERS = foo.h bar/bar.h
+@end example
+
+@noindent
+will install the two files as @file{$(includedir)/foo.h} and
+@file{$(includedir)/bar.h}.
+
+The @samp{nobase_} prefix is also supported,
+
+@example
+nobase_include_HEADERS = foo.h bar/bar.h
+@end example
+
+@noindent
+will install the two files as @file{$(includedir)/foo.h} and
+@file{$(includedir)/bar/bar.h} (@pxref{Alternative}).
+
+@vindex noinst_HEADERS
+Usually, only header files that accompany installed libraries need to
+be installed. Headers used by programs or convenience libraries are
+not installed. The @code{noinst_HEADERS} variable can be used for
+such headers. However when the header actually belongs to one
+convenient library or program, we recommend listing it in the
+program's or library's @samp{_SOURCES} variable (@pxref{Program
+Sources}) instead of in @code{noinst_HEADERS}. This is clearer for
+the @file{Makefile.am} reader. @code{noinst_HEADERS} would be the
+right variable to use in a directory containing only headers and no
+associated library or program.
+
+All header files must be listed somewhere; in a @samp{_SOURCES}
+variable or in a @samp{_HEADERS} variable. Missing ones will not
+appear in the distribution.
+
+For header files that are built and must not be distributed, use the
+@samp{nodist_} prefix as in @code{nodist_include_HEADERS} or
+@code{nodist_prog_SOURCES}. If these generated headers are needed
+during the build, you must also ensure they exist before they are
+used, see @xref{Sources}.
@node Data