Re: autoconf --trace MACROS works for AC_* marcoses only?

2009-10-07 Thread Ralf Wildenhues
Hello Peter, * Peter Volkov wrote on Wed, Sep 30, 2009 at 07:07:03PM CEST: > Does autoconf --trace MACROS works for AC_* marcoses only? No, but autoconf needs to know what a macro is; IOW, it needs to see a macro definition somewhere. > I've tried to > use it to find AM_GNU_GETTEXT_VERSION macro

Re: Autoconf --trace

2000-03-08 Thread T.E.Dickey
> > > "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: > > Lars> Actually, I was informed by John W. Eaton through private email > Lars> that the 'in "$@"' part is the default and can therefore be > Lars> dropped. My opinion on this (which is influenced by my personal > Lars> sh-script

Re: Autoconf --trace

2000-03-08 Thread Akim Demaille
> "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: Lars> You can 'shift' out the dummy at once, though, and leave out the Lars> case for it (I assume you'll have a switch/case inside the for Lars> loop), but then you must use the ${1+"$@"} approach. That's what I meant, dummy could be anythi

Re: Autoconf --trace

2000-03-08 Thread Lars J. Aas
On Wed, Mar 08, 2000 at 11:31:27AM +0100, Akim Demaille wrote: : Lars> I think the dummy-approach is safest. I didn't look into which : Lars> context this was to be used in, but I'd probably name it : Lars> _ac_dummy or something like that... : : `dummy' is just a string here, there is no proble

Re: Autoconf --trace

2000-03-08 Thread Akim Demaille
> "Lars" == Lars J Aas <[EMAIL PROTECTED]> writes: Lars> Actually, I was informed by John W. Eaton through private email Lars> that the 'in "$@"' part is the default and can therefore be Lars> dropped. My opinion on this (which is influenced by my personal Lars> sh-scripting conventions) is

Re: Autoconf --trace

2000-03-08 Thread Alexandre Oliva
On Mar 8, 2000, "Lars J. Aas" <[EMAIL PROTECTED]> wrote: > On Wed, Mar 08, 2000 at 11:09:07AM +0100, Akim Demaille wrote: > : | eval set $list > : | for elt in "$@"; do > : | echo $elt > : | done > : | > : | So there. Now you won't get any more suggestions from me :) > : > : I agree, this i

Re: Autoconf --trace

2000-03-08 Thread Lars J. Aas
On Wed, Mar 08, 2000 at 11:09:07AM +0100, Akim Demaille wrote: : | eval set $list : | for elt in "$@"; do : | echo $elt : | done : | : | So there. Now you won't get any more suggestions from me :) : : I agree, this is perfect. Actually, I was informed by John W. Eaton through private email t

Re: Autoconf --trace

2000-03-08 Thread Alexandre Oliva
On Mar 8, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > Now the question is, do we want to pollute > autoconf.sh, a maintainer tool, with portability issues? Yes, at least in this case. > If yes, we need to > eval set dummy $list > shift So be it. It's simple enough. -- Alexandre Oliva

Re: Autoconf --trace

2000-03-08 Thread Akim Demaille
| On Tue, Mar 07, 2000 at 11:50:46AM +0100, Akim Demaille wrote: | : | eval set $list | : | while test $# -gt 0; do | : | echo $1 | : | shift | : | done | : | : Excellent, thanks! I think this is the best means to handle the list | : here. | | The most elegant solution I found (can't give

Re: Autoconf --trace

2000-03-08 Thread Lars J. Aas
On Tue, Mar 07, 2000 at 11:50:46AM +0100, Akim Demaille wrote: : | eval set $list : | while test $# -gt 0; do : | echo $1 : | shift : | done : : Excellent, thanks! I think this is the best means to handle the list : here. The most elegant solution I found (can't give it a rest already! ;) i

Re: Autoconf --trace

2000-03-07 Thread Akim Demaille
| On Tue, Mar 07, 2000 at 10:37:29AM +0100, Akim Demaille wrote: | : In fact, can someone teach me (point me to a good example) how to | : split strings such as | : | : list="'first element' 'second' 'third one'" | : for elt in $list | | I managed to make this work: | | eval set $list | while

Re: Autoconf --trace

2000-03-07 Thread Lars J. Aas
On Tue, Mar 07, 2000 at 10:37:29AM +0100, Akim Demaille wrote: : In fact, can someone teach me (point me to a good example) how to : split strings such as : : list="'first element' 'second' 'third one'" : for elt in $list This too: eval "for elt in $list; do echo \"\$elt\"; done" Lars J

Re: Autoconf --trace

2000-03-07 Thread Russ Allbery
Akim Demaille <[EMAIL PROTECTED]> writes: > I was also thinking of something like ${}@ and the like, this would > allow to use something way simpler than balanced [ ] to parse these > guys. I guess one can split() in Perl with a separator such as `:'? Yup. -- Russ Allbery ([EMAIL PROT

Re: Autoconf --trace

2000-03-07 Thread Lars J. Aas
On Tue, Mar 07, 2000 at 10:37:29AM +0100, Akim Demaille wrote: : In fact, can someone teach me (point me to a good example) how to : split strings such as : : list="'first element' 'second' 'third one'" : for elt in $list I managed to make this work: eval set $list while test $# -gt 0; do ech

Re: Autoconf --trace

2000-03-07 Thread Akim Demaille
> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes: >> I have implemented support for $.@, which is [$1].[$2]. etc. (`.' >> is the separator, defaults to comma), and for $.*, which is >> smash($1).smash($2). etc., where `.' defaults to `:', and `smash' >> singles out all the white sp

Re: Autoconf --trace

2000-03-06 Thread Alexandre Oliva
On Feb 29, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > Gosh, it feels good when m4 finally agrees to do what you wanted to > :-) :-) > I have implemented support for $.@, which is [$1].[$2]. etc. (`.' is > the separator, defaults to comma), and for $.*, which is > smash($1).smash($2). etc.

Re: Autoconf --trace

2000-02-29 Thread Akim Demaille
Yeehaa, Yahoo, Yipee and the like! Well, there are some significant steps forward since yesterday :) Gosh, it feels good when m4 finally agrees to do what you wanted to :-) I have implemented support for $.@, which is [$1].[$2]. etc. (`.' is the separator, defaults to comma), and for $.*, whic

Re: autoconf --trace

2000-02-15 Thread Akim Demaille
| On Feb 15, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: | > $ autoconf --trace AC_SUBST:$f:$l:$0:$1 | | > => configure.in:42:AC_SUBST:prefix | Sounds good to me. But are the `:' separators mandatory, or can we | just choose any expansion to a given macro? For example, we could | m

Re: autoconf --trace

2000-02-15 Thread Alexandre Oliva
On Feb 15, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > $ autoconf --trace AC_SUBST:$f:$l:$0:$1 > => configure.in:42:AC_SUBST:prefix Sounds good to me. But are the `:' separators mandatory, or can we just choose any expansion to a given macro? For example, we could make it like th

Re: autoconf --trace

2000-02-15 Thread Akim Demaille
|From: Akim Demaille <[EMAIL PROTECTED]> |Date: 14 Feb 2000 10:43:04 +0100 | | s/^m4trace:\([^:]*\):\([^:]*\): -[0-9]*- \([^(]*(\)\(.*\)$/\3[\1], [\2], \4/ | | This looks like a good idea to me. I would improve it slightly by | making it more specific, e.g. | | s/^m4trace:\([^:][^

Re: autoconf --trace

2000-02-15 Thread Akim Demaille
> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes: Alexandre> On Feb 14, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: >> - every macro becomes extremely picky on the quotes, since there is >> embedded code which really depends upon [ and ]. Alexandre> Can't this be done in a way

Re: autoconf --trace

2000-02-15 Thread Akim Demaille
> "Olly" == Olly Betts <[EMAIL PROTECTED]> writes: Olly> One thought: If this tracing is for use when automake is being Olly> used, you can rely on perl being available. As reported by Alexandre, some simple output is sometimes needed by shell scripts. And in most cases we just don't need t

Re: autoconf --trace

2000-02-15 Thread Alexandre Oliva
On Feb 14, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote: > - every macro becomes extremely picky on the quotes, since there is > embedded code which really depends upon [ and ]. Can't this be done in a way that only traced macros become that picky? This would allow for at least a soft transit

Re: autoconf --trace

2000-02-15 Thread Alexandre Oliva
On Feb 14, 2000, [EMAIL PROTECTED] (Olly Betts) wrote: > One thought: If this tracing is for use when automake is being used, > you can rely on perl being available. It's not only for automake, but it is sensible to require perl to properly match brackets. This can't be done with regular expres

Re: autoconf --trace

2000-02-14 Thread Olly Betts
In article <[EMAIL PROTECTED]>, Akim Demaille wrote: >So we *have* to deal with m4's --trace output. Part of the problem is >that we have to parse balanced [ and ], ( and ) etc. and I must say I >don't know how to do that in sh and Co (I'd be happy that someone >teach me) (well, I don't mean coun

Re: autoconf --trace

2000-02-14 Thread Paul Eggert
From: Akim Demaille <[EMAIL PROTECTED]> Date: 14 Feb 2000 10:43:04 +0100 s/^m4trace:\([^:]*\):\([^:]*\): -[0-9]*- \([^(]*(\)\(.*\)$/\3[\1], [\2], \4/ This looks like a good idea to me. I would improve it slightly by making it more specific, e.g. s/^m4trace:\([^:][^:]*\):\([0-9][0-9]*