test harness: improve catching of usage errors in script 'test-driver'
[platform/upstream/automake.git] / doc / automake.texi
index feae3ac..8f4020b 100644 (file)
@@ -53,6 +53,8 @@ section entitled ``GNU Free Documentation License.''
 @author David MacKenzie
 @author Tom Tromey
 @author Alexandre Duret-Lutz
+@author Ralf Wildenhues
+@author Stefano Lattarini
 @page
 @vskip 0pt plus 1filll
 @insertcopying
@@ -3994,10 +3996,11 @@ choose the assembler for you (by default the C compiler) and set
 
 @item AM_PROG_CC_C_O
 @acindex AM_PROG_CC_C_O
-@acindex AC_PROG_CC_C_O
-This is an @emph{obsolete wrapper} around @code{AC_PROG_CC_C_O}.
-New code needs not use this macro.  It might be deprecated and
-@emph{retired in future Automake versions}.
+This is an obsolescent macro that checks that the C compiler supports
+the @option{-c} and @option{-o} options together.  Note that, since
+Automake 1.14, the @code{AC_PROG_CC} is rewritten to implement such
+checks itself, and thus the explicit use of @code{AM_PROG_CC_C_O}
+should no longer be required.
 
 @item AM_PROG_LEX
 @acindex AM_PROG_LEX
@@ -4068,13 +4071,6 @@ Invocation, , Using @command{autoupdate} to Modernize
 
 @table @code
 
-@item AM_PROG_CC_C_O
-@acindex AM_PROG_CC_C_O
-@acindex AC_PROG_CC_C_O
-This is an @emph{obsolete wrapper} around @code{AC_PROG_CC_C_O}.  New
-code needs not to use this macro.  It will be deprecated, and then
-removed, in future Automake versions.
-
 @item AM_PROG_MKDIR_P
 @acindex AM_PROG_MKDIR_P
 @cindex @code{mkdir -p}, macro check
@@ -4092,8 +4088,8 @@ the output variable @code{MKDIR_P} instead.  In case you are still
 using the @code{AM_PROG_MKDIR_P} macro in your @file{configure.ac},
 or its provided variable @code{$(mkdir_p)} in your @file{Makefile.am},
 you are advised to switch ASAP to the more modern Autoconf-provided
-interface instead; both the macro and the variable @emph{will be
-removed} in the next major Automake release.
+interface instead; both the macro and the variable might be removed
+in a future major Automake release.
 
 @end table
 
@@ -7601,11 +7597,11 @@ libtool, The Libtool Manual}) with the @code{LTLIBRARIES} primary.
 Automake provides some minimal support for Java bytecode compilation with
 the @code{JAVA} primary (in addition to the support for compiling Java to
 native machine code; @pxref{Java Support with gcj}).  Note however that
-@emph{the interface and most features described here are deprecated}; the
-next automake release will strive to provide a better and cleaner
+@emph{the interface and most features described here are deprecated}.
+Future Automake releases will strive to provide a better and cleaner
 interface, which however @emph{won't be backward-compatible}; the present
-interface will probably be removed altogether in future automake releases
-(1.13 or later), so don't use it in new code.
+interface will probably be removed altogether some time after the
+introduction of the new interface (if that ever materializes).
 
 Any @file{.java} files listed in a @code{_JAVA} variable will be
 compiled with @code{JAVAC} at build time.  By default, @file{.java}
@@ -8704,13 +8700,16 @@ Generate a @samp{zip} archive of the distribution.
 
 @item @code{dist-tarZ}
 Generate a tar archive of the distribution, compressed with the
-historical (obsolescent) program @command{compress}.  Use of this
-option is discouraged.
+historical (and obsolescent) program @command{compress}.  This
+option is deprecated, and it and the corresponding functionality
+will be removed altogether in Automake 2.0.
 @trindex dist-tarZ
 
 @item @code{dist-shar}
-Generate a @samp{shar} archive of the distribution.  This format archive
-is obsolescent, and use of this option is discouraged.
+Generate a @samp{shar} archive of the distribution.  This format
+archive is obsolescent, and use of this option is deprecated.
+It and the corresponding functionality will be removed altogether
+in Automake 2.0.
 @trindex dist-shar
 
 @end table
@@ -9099,6 +9098,12 @@ followed by any number of alphabetic characters.
 For example, @samp{.sh}, @samp{.T} and @samp{.t1} are valid extensions,
 while @samp{.x-y}, @samp{.6c} and @samp{.t.1} are not.
 
+@cindex Configure substitutions in @code{TESTS}
+It is important to note that, due to current limitations (unlikely to be
+lifted), configure substitutions in the definition of @code{TESTS} can
+only work if they will expand to a list of tests that have a suffix listed
+in @code{TEST_EXTENSIONS}.
+
 @vindex _LOG_COMPILE
 @vindex _LOG_COMPILER
 @vindex _LOG_FLAGS
@@ -10100,15 +10105,17 @@ Hook @code{dist-zip} to @code{dist}.
 @cindex Option, @option{dist-shar}
 @opindex dist-shar
 Hook @code{dist-shar} to @code{dist}.  Use of this option
-is discouraged, as the @samp{shar} format is obsolescent and
-problematic.
+is deprecated, as the @samp{shar} format is obsolescent and
+problematic.  Support for it will be removed altogether in
+Automake 2.0.
 @trindex dist-shar
 
 @item @option{dist-tarZ}
 @cindex Option, @option{dist-tarZ}
 @opindex dist-tarZ
 Hook @code{dist-tarZ} to @code{dist}.  Use of this option
-is discouraged, as the @samp{compress} program is obsolete.
+is deprecated, as the @samp{compress} program is obsolete.
+Support for it will be removed altogether in Automake 2.0.
 @trindex dist-tarZ
 
 @item @option{filename-length-max=99}
@@ -10519,6 +10526,26 @@ condition applies to the entire contents of that fragment.
 Makefile fragments included this way are always distributed because
 they are needed to rebuild @file{Makefile.in}.
 
+Inside a fragment, the construct @code{%reldir%} is replaced with the
+directory of the fragment relative to the base @file{Makefile.am}.
+Similarly, @code{%canon_reldir%} is replaced with the canonicalized
+(@pxref{Canonicalization}) form of @code{%reldir%}.  As a convenience,
+@code{%D%} is a synonym for @code{%reldir%}, and @code{%C%}
+is a synonym for @code{%canon_reldir%}.
+
+A special feature is that if the fragment is in the same directory as
+the base @file{Makefile.am} (i.e., @code{%reldir%} is @code{.}), then
+@code{%reldir%} and @code{%canon_reldir%} will expand to the empty
+string as well as eat, if present, a following slash or underscore
+respectively.
+
+Thus, a makefile fragment might look like this:
+
+@example
+bin_PROGRAMS += %reldir%/mumble
+%canon_reldir%_mumble_SOURCES = %reldir%/one.c
+@end example
+
 @node Conditionals
 @chapter Conditionals