[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool 2.4 args parsing incredibly slow
From: |
Ralf Wildenhues |
Subject: |
Re: libtool 2.4 args parsing incredibly slow |
Date: |
Thu, 27 Jan 2011 10:14:36 +0100 |
Hello Ingo,
* Ingo Krabbe wrote on Thu, Jan 27, 2011 at 08:52:51AM CET:
> Whats about the quite simple solution using sed? Actually the sed call
> should be faster for many arguments and is reasonable fast for short
> command lines.
$(cmd) command substitution is not portable.
printf is not portably bug-free to handle long inputs.
Portable sed cannot handle long input lines.
This is all documented in the Shell Portability chapter
of the Autoconf manual.
> func_exec_program ()
> {
> func_exec_program_core $(printf "\"%s\" " "$@" | sed \
> -e 's/"--lt-[^"]*"[ \t]*//g' \
> -e 's/^"\([^"]*\)"/\1/g' \
> -e 's/[ \t]*"\([^"]*\)"/ \1/g'
> )
> }
Your code mishandles arguments like 'X"--lt-foo"bar',
and, more generally, arguments that contain double quotes.
Cheers,
Ralf
- Re: libtool 2.4 args parsing incredibly slow, (continued)
- Re: libtool 2.4 args parsing incredibly slow, Ingo Krabbe, 2011/01/25
- Re: libtool 2.4 args parsing incredibly slow, Peter O'Gorman, 2011/01/25
- Re: libtool 2.4 args parsing incredibly slow, Peter O'Gorman, 2011/01/25
- Re: libtool 2.4 args parsing incredibly slow, Chet Ramey, 2011/01/30
- Re: libtool 2.4 args parsing incredibly slow, Dan McGee, 2011/01/29
- Re: libtool 2.4 args parsing incredibly slow, Ralf Wildenhues, 2011/01/30
- Re: libtool 2.4 args parsing incredibly slow, Chet Ramey, 2011/01/31
Re: libtool 2.4 args parsing incredibly slow, Peter O'Gorman, 2011/01/26
Re: libtool 2.4 args parsing incredibly slow, Peter O'Gorman, 2011/01/28
Re: libtool 2.4 args parsing incredibly slow, Dan McGee, 2011/01/28