From: Bruno Haible Date: Fri, 9 Oct 2009 03:36:45 +0000 (+0200) Subject: Recommend `sh -n' debugging, and public result variables for macros. X-Git-Tag: v2.65~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81f4709a56efced253cddf80f333e85fe136a974;p=thirdparty%2Fautoconf.git Recommend `sh -n' debugging, and public result variables for macros. * doc/autoconf.texi (Debugging): Recommend to use "bash -n configure". Recommend the use of result variables as an alternative to run-if-true/run-if-false parameters. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 21a5a6e4..82d131c4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-10-09 Bruno Haible + Ralf Wildenhues + + Recommend `sh -n' debugging, and public result variables for macros. + * doc/autoconf.texi (Debugging): Recommend to use "bash -n + configure". Recommend the use of result variables as an + alternative to run-if-true/run-if-false parameters. + 2009-10-05 Bruno Haible * doc/autoconf.texi (Particular Functions): Swap sections about diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 6a31a21f..fd761502 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -24279,6 +24279,13 @@ possibility is to sprinkle pairs of @code{m4_traceon} and or listing some macro names and watch @command{m4} expand its input verbosely (@pxref{Debugging via autom4te}). +@item +Sometimes @command{autoconf} succeeds but the generated +@command{configure} script has invalid shell syntax. You can detect this +case by running @samp{bash -n configure} or @samp{sh -n configure}. +If this command fails, the same tips apply, as if @command{autoconf} had +failed. + @item Debugging @command{configure} script execution may be done by sprinkling pairs of @code{set -x} and @code{set +x} into the shell script before @@ -24339,7 +24346,8 @@ tests, @item by not requiring users of your macro to use the cache variables. Instead, expose the result of the test via @var{run-if-true} and -@var{run-if-false} parameters. +@var{run-if-false} parameters. If the result is not a boolean, +then provide it through documented shell variables. @end itemize