libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH 1/6] Add --gnulib-version and --news options to announce-gen.


From: Gary V. Vaughan
Subject: Re: [PATCH 1/6] Add --gnulib-version and --news options to announce-gen.
Date: Wed, 1 Sep 2010 13:09:32 +0700

On 1 Sep 2010, at 12:25, Ralf Wildenhues wrote:
> Hello Gary,

Hallo Ralf,

> * Gary V. Vaughan wrote on Wed, Sep 01, 2010 at 03:59:19AM CEST:
>> On 1 Sep 2010, at 00:41, Ralf Wildenhues wrote:
>>> I personally find the M4SH_GETOPTS rather unreadable; it's a nice table,
>>> but I cannot make sense of the entries, or review them, except by
>>> looking at the generated code, at which point I'd rather just read the
>>> generated code directly; after all, that's how we found several bugs in
>>> the ltmain incarnation of this code.
>> 
>> The documentation is in getopts.m4sh, just above the M4SH_GETOPTS
>> definition.
> 
> That didn't help to make it more readable, or cause less buggy code
> though.

Well that's because the shared code in getopts.m4sh is still getting
exposure.  I think that M4SH_GETOPTS is infinitely more readable and
maintainable, and especially worth the effort of using and debugging
if I am to contribute a variation to Autoconf's m4sugar libraries.

Why maintain several copies of the same code if we can do it just
once?

>> Surely you're not suggesting that we continue to hand code, maintain,
>> synchronize the option parsing loop in each of our scripts?
> 
> Well, bootstrap didn't need one so far, did it?  How much maintenance
> does an option parsing loop need, once it is written?  I didn't have the
> feeling that that was a biggie on our list before that.

Certainly not a biggie.  But after using the M4SH_GETOPTS generated
bootstrap script on my gnulib branch for less than a week, going back
to the under-featured master branch version is already painful.

>>> The --rcfile handling code mistreats quoting in the rcfile, and things
>>> like multiple adjacent whitespace.
>> 
>> Examples please.  I haven't had any issues using this idiom in any of
>> the --rcfile parsing in any of the shell scripts I've used this code
>> with since I wrote it for cvs-utils (if memory serves).
> 
> Put this in the rcfile, observe how the two spaces are flattened to one:
>  --message 'One sentence.  Another sentence.'

Oh yuck. Nice catch though.  I've added a note to investigate that in my
copy of announce-gen.m4sh incase I ever publish an --rcfile using
shell script that pastes code from here in future.

Cheers,
-- 
Gary V. Vaughan (address@hidden)

Attachment: PGP.sig
Description: This is a digitally signed message part


reply via email to

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