autoconf-patches
[Top][All Lists]
Advanced

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

Re: Cleanup of option help strings


From: Alexandre Duret-Lutz
Subject: Re: Cleanup of option help strings
Date: Wed, 14 Jan 2004 00:48:13 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

>>> "Eric" == Eric Sunshine <address@hidden> writes:

 Eric> This code should be using AC_HELP_STRING (or
 Eric> AS_HELP_STRING in most recent Autoconf) to format the
 Eric> help strings automatically, rather than doing the
 Eric> formatting manually (which is not robust).

I liked AC_HELP_STRING when I learned about it, because it
solved a problem I had with aligning computed help-string.  
So I started to use it systematically.

Then, as many people, I discovered it was not robust.
  http://sources.redhat.com/ml/autoconf/2001-02/msg00090.html
  http://sources.redhat.com/ml/autoconf/2001-07/msg00121.html 
I don't remember if I tried to fix it (most likely Akim told be
"I already tried" and that was a sufficient reason not to waste
more time on this).

Now I think the only case where AC_HELP_STRING is really
warranted is when one of its arguments is computed at M4-time
and you do not know its length beforehand.  E.g., in

AC_DEFUN([AC_PATH_GENERIC],
[pushdef([DOWN], translit([$1], [A-Z], [a-z]))dnl
 AC_ARG_WITH(DOWN[-prefix],
 [AC_HELP_STRING([--with-]DOWN[-prefix=PFX],
                 [Prefix where $1 is installed (optional)])],
...
 popdef([DOWN])
])

I would not claim that using AC_HELP_STRING in other cases is
wrong, but I would certainly not advocate it as safer writing
style.  It's possible to misalign things with and without
AC_HELP_STRING, and there are things that can be aligned only by
one style or the other.
-- 
Alexandre Duret-Lutz





reply via email to

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