| Akim Demaille writes:
| > Actually, a bit of both: I was afraid of clashes, in particular with
| > the $@ output.  So it seemed better to leave the quadrigraphs as are.
| 
| Hmm.  If there were indeed a chance of clashing with things like $@, then
| it'd also be present when generating the real 'configure' output.  So I
| cannot quite imagine how this would be of concern.
| 
| > I tend to think it depends on the actual use.  What is yours?
| 
| I'm trying to generate Makefile.in snippets, using
| 
| autoconf -t 'AC_SUBST:$1 = @$1@' | sort -u
| 
| This works OK, except for LIB@&t@OBJS.

Actually, I fairly well recall that I couldn't make my mind on this
issue, but I was wrong as to which option I kept :)  This is autom4te:

sub handle_traces ($$%)
{

[....]

  my $in = new Autom4te::XFile ("$m4 $tmp/traces.m4 |");
  my $out = new Autom4te::XFile (">$output");

  # FIXME: Hm... This is dubious: should we really transform the
  # quadrigraphs in traces?  It might break balanced [ ] etc. in the
  # output.
  while ($_ = $in->getline)
    {
      # It makes no sense to try to transform __oline__.
      s/\@<:\@/[/g;
      s/\@:>\@/]/g;
      s/\@\$\|\@/\$/g;
      s/\@%:\@/#/g;
      print $out $_;
    }
}


As you can see, I forgot the latest quadrigraph.  I'm installing this:

Index: ChangeLog
from  Akim Demaille  <[EMAIL PROTECTED]>
        * bin/autom4te.in (handle_traces): Handle @&t@ in traces.
        Reported by Peter Eisentraut.

2002-10-23  Akim Demaille  <[EMAIL PROTECTED]>

Index: bin/autom4te.in
===================================================================
RCS file: /cvsroot/autoconf/autoconf/bin/autom4te.in,v
retrieving revision 1.73
diff -u -u -r1.73 autom4te.in
--- bin/autom4te.in 18 Oct 2002 15:20:46 -0000 1.73
+++ bin/autom4te.in 23 Oct 2002 07:37:20 -0000
@@ -999,9 +999,9 @@
   my $in = new Autom4te::XFile ("$m4 $tmp/traces.m4 |");
   my $out = new Autom4te::XFile (">$output");
 
-  # FIXME: Hm... This is dubious: should we really transform the
-  # quadrigraphs in traces?  It might break balanced [ ] etc. in the
-  # output.
+  # This is dubious: should we really transform the quadrigraphs in
+  # traces?  It might break balanced [ ] etc. in the output.  The
+  # consensus seeems to be that traces are more useful this way.
   while ($_ = $in->getline)
     {
       # It makes no sense to try to transform __oline__.
@@ -1009,6 +1009,7 @@
       s/\@:>\@/]/g;
       s/\@\$\|\@/\$/g;
       s/\@%:\@/#/g;
+      s/\@&t\@//g;
       print $out $_;
     }
 }


Reply via email to