autoconf-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Autoconf source repository branch, master, updated. v2.63b-96-


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.63b-96-gde8a83c
Date: Sat, 25 Jul 2009 12:53:56 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=de8a83c3e977937782ef3ce686909d7fa7538e81

The branch, master has been updated
       via  de8a83c3e977937782ef3ce686909d7fa7538e81 (commit)
       via  3963d3ad3ef46190650474d56a9e750648a23036 (commit)
      from  77350bd98ce38adde4fe3f80cd73f07fd414db58 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit de8a83c3e977937782ef3ce686909d7fa7538e81
Author: Eric Blake <address@hidden>
Date:   Sat Jul 25 06:51:59 2009 -0600

    Document some autom4te debugging tips.
    
    * doc/autoconf.texi (Debugging via autom4te): New node.
    Suggested by Bruno Haible.
    
    Signed-off-by: Eric Blake <address@hidden>

commit 3963d3ad3ef46190650474d56a9e750648a23036
Author: Eric Blake <address@hidden>
Date:   Sat Jul 25 06:24:49 2009 -0600

    Fix font-lock.
    
    * configure.ac (ac_cv_unsupported_fs_chars): Make editing easier.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog         |    7 ++++++
 configure.ac      |    4 +-
 doc/autoconf.texi |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 71 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5daef4d..4ed5149 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-07-25  Eric Blake  <address@hidden>
 
+       Document some autom4te debugging tips.
+       * doc/autoconf.texi (Debugging via autom4te): New node.
+       Suggested by Bruno Haible.
+
+       Fix font-lock.
+       * configure.ac (ac_cv_unsupported_fs_chars): Make editing easier.
+
        Let autoheader see through m4 macros in AC_DEFINE.
        * lib/autoconf/general.m4 (AC_DEFINE_TRACE): Expand macro before
        tracing its name.
diff --git a/configure.ac b/configure.ac
index 0f2aec1..0d579f8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -69,9 +69,9 @@ fi
 AC_SUBST([ac_cv_sh_n_works])
 
 AC_MSG_CHECKING([for characters that cannot appear in file names])
-AC_CACHE_VAL( [ac_cv_unsupported_fs_chars],
+AC_CACHE_VAL([ac_cv_unsupported_fs_chars],
 [ac_cv_unsupported_fs_chars=
-for c in '\\' '"' '<' '>' '*' '?' '|'
+for c in '\\' \" '<' '>' '*' '?' '|'
 do
   touch "conftest.t${c}t" 2>/dev/null
   test -f "conftest.t${c}t" && rm -f "conftest.t${c}t" && continue
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 34df30b..0b61e35 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -430,6 +430,7 @@ Programming in M4
 * M4 Quotation::                Protecting macros from unwanted expansion
 * Using autom4te::              The Autoconf executables backbone
 * Programming in M4sugar::      Convenient pure M4 macros
+* Debugging via autom4te::      Figuring out what M4 was doing
 
 Programming in M4sh
 
@@ -9414,6 +9415,7 @@ matter of fact, @emph{anything that is not documented 
must not be used}.
 * M4 Quotation::                Protecting macros from unwanted expansion
 * Using autom4te::              The Autoconf executables backbone
 * Programming in M4sugar::      Convenient pure M4 macros
+* Debugging via autom4te::      Figuring out what M4 was doing
 @end menu
 
 @node M4 Quotation
@@ -12426,6 +12428,66 @@ Any token matching @var{pattern} is allowed, including 
if it matches an
 @code{m4_pattern_forbid} pattern.
 @end defmac
 
address@hidden Debugging via autom4te
address@hidden Debugging via autom4te
address@hidden debugging tips
address@hidden autom4te debugging tips
address@hidden m4sugar debugging tips
+At times, it is desirable to see what was happening inside m4, to see
+why output was not matching expectations.  However, post-processing done
+by @command{autom4te} means that directly using the m4 builtin
address@hidden is likely to interfere with operation.  Also, frequent
+diversion changes and the concept of forbidden tokens make it difficult
+to use @code{m4_defn} to generate inline comments in the final output.
+
+There are a couple of tools to help with this.  One is the use of the
address@hidden option provided by @command{autom4te} (as well as each
+of the programs that wrap @command{autom4te}, such as
address@hidden), in order to inspect when a macro is called and with
+which arguments.  For example, when this paragraph was written, the
+autoconf version could be found by:
+
address@hidden
+$ @kbd{autoconf --trace=AC_INIT}
+configure.ac:23:AC_INIT:GNU Autoconf:2.63b.95-3963:bug-autoconf@@gnu.org
+$ @kbd{autoconf --trace='AC_INIT:version is $2'}
+version is 2.63b.95-3963
address@hidden example
+
+Another trick is using @code{m4_errprintn} to output debugging messages
+to standard error with no further m4 expansion, and without interfering
+with the post-processing done to standard output.  For example, contrast
+these two attempts to learn how @code{m4_dquote} is implemented:
+
address@hidden
+$ @kbd{cat <<\EOF > foo.m4}
+m4_init
+try one: [m4_dquote is ]m4_defn([m4_dquote])
+m4_divert([0])dnl
+try two: [m4_dquote is ]m4_defn([m4_dquote])
+m4_dquote([hi])
+EOF
+$ @kbd{autom4te --language=m4sugar -o foo foo.m4}
+foo.m4:2: error: possibly undefined macro: m4_dquote
+      If this token and others are legitimate, please use m4_pattern_allow.
+      See the Autoconf documentation.
+$ @kbd{cat foo}
+try two: m4_dquote is [$@@]
+[hi]
+$ @kbd{cat <<\EOF > foo.m4}
+m4_init
+m4_errprintn([try one: m4_dquote is ]m4_defn([m4_dquote]))
+m4_divert([0])dnl
+m4_errprintn([try two: m4_dquote is ]m4_defn([m4_dquote]))dnl
+m4_dquote([hi])
+EOF
+$ @kbd{autom4te --language=m4sugar foo.m4}
+try one: m4_dquote is [$@@]
+try two: m4_dquote is [$@@]
+$ @kbd{cat foo}
+[hi]
address@hidden smallexample
+
 @node Programming in M4sh
 @chapter Programming in M4sh
 


hooks/post-receive
-- 
GNU Autoconf source repository




reply via email to

[Prev in Thread] Current Thread [Next in Thread]