autoconf
[Top][All Lists]
Advanced

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

Re: converting netkit to autoconf?


From: Bruce Korb
Subject: Re: converting netkit to autoconf?
Date: Tue, 13 Aug 2002 19:46:35 -0700

Paul Eggert wrote:

> True, but every language has insane quoting rules.

The main issue is that M4's vary and they interact with
those of the output text and any (sub)macros that get
invoked.  That puts it far over the top.

> M4's rules are sometimes painful, but the shell's are often worse.

No way.  What is crucial in quoting rules is that they
be consistent.  M4's are not.  Second in importance is that
they be few in number.  M4, si, shell, no!

> I have been toying with the idea of redoing Autoconf without M4, by
> just using the shell.  The basic idea here is that we have to live
> with shell quoting anyway, so let's use that and not have two kinds of
> quoting.

The shell has five:

  1.  ''
  2.  ""
  3.  ``
  4.  here-docs
  5.  quoted-here-docs

each of which has "interesting" properties that are not quite
the same as any of the others.  Icky poo.  So, let's use a tool
that *understands* shell weirdisms and can perform appropriate
escaping to produce the desired effect. :)  For your amusement:

  http://AutoGen.sourceforge.net/doc/autogen_3.html#SEC87

and the next couple of sections, especially the table in #SEC89

> I would assume a POSIX 1003.2-1992 shell or later,

Gosh!  That _IS_ a good idea.  Dumping support for K&R compilers
is good, too.  Let the hobbiests bootstrap with an old bash + gcc 2.7.2

> think it's OK to cut that backward-compatibility cord.  However, this
> is A Big Change, and one that is not to be taken lightly.

Forgive me if I do.  :-)

> > ... put substantial code fragments for tests in their own files
> 
> And, all too often, one
> must plop arbitrary symbols into the middle of test files.

Yep.  But you can spool them to a shar archive and then use
sed to make the substitutions.  You just need a way to:

  sed "whatever" ${CONFTESTDIR}/${MYTESTID}.c > ${CONFTESTDIR}/conftest.c

If you assume shell functions, you will certainly save a lot of
unnecessary complexity.

Bruce Korb <first initial + last name at gnu dot org>
AG URL: http://autogen.sourceforge.net




reply via email to

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