autoconf
[Top][All Lists]
Advanced

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

Re: autoconf option fun


From: Akim Demaille
Subject: Re: autoconf option fun
Date: 08 Nov 2000 10:43:38 +0100
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

>>>>> "Alexandre" == Alexandre Oliva <address@hidden> writes:

>> Yep, I'm in favor of removing all the --a* etc. it makes it
>> uselessly ambiguous, and short options are a better means to
>> abbreviate.  And trying to support exact abbreviations, as is done
>> in configure, is an additional tedious maintenance nightmare.

Alexandre> Agreed.  But beware that this decision goes against the GNU
Alexandre> Coding Standards.

Yes.  It's only for sake of simplicity of the maintenance that I want
to avoid this.  It's a real nightmare to walk that road, since
basically each time you add/remove/alter an option, you have to
rethink the whole option processing.

Alexandre> I guess we should have an m4sh (or m4sugar?) macro to
Alexandre> expand:

Alexandre> m4_case_longopt([foo])

Alexandre> to

Alexandre> --foo | --fo | --f

Alexandre> and

Alexandre> m4_case_longoptarg([foo])

Alexandre> to

Alexandre> --foo=* | --fo=* | --f=*

Yes, that's definitely the plan.  In fact, I have even bigger
ambitions: some kind of a getopt which would understand by itself that
--version and --verbose share a prefix etc.  That's one of the reasons
why I can't wait for Gary's M4, since I don't believe it is reasonable
to try to implement such a getopt in pure M4: a module would be most
welcome.

AS_GETOPT([help, h], 
             [# do your stuff],
          [version, V],
             [echo "$version"; exit],
          [verbose, v],
             [verbose=echo],
          [m4dir, autoconf-dir, macro-dir, m], 
             [m4dir=$[1]]
          ...)



reply via email to

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