autoconf-patches
[Top][All Lists]
Advanced

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

Re: 21-fyi-as-require.patch


From: Paul Eggert
Subject: Re: 21-fyi-as-require.patch
Date: Mon, 8 Oct 2001 11:31:35 -0700 (PDT)

> From: Akim Demaille <address@hidden>
> Date: Mon, 08 Oct 2001 10:29:42 +0200
> 
> foo=`if expr a : '\(a\)' >/dev/null 2>&1; then
>   as_expr=expr
> else
>   as_expr=false
> fi
> 
> $as_expr Xfoo : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
>          Xfoo : 'X\(//\)[^/]' \| \
>          Xfoo : 'X\(//\)$' \| \
>          Xfoo : 'X\(/\)' \| \
>          .     : '\(.\)'`
> 
> 
> (note that it is not only cosmetics: being set in backquotes, as_expr
> is *not* defined in the top level of the shell script).

But doesn't this repeat the work of computing as_expr, and cause
'configure' to generate three processes for each invocation of expr,
whereas before it would generate one for each invocation of expr (plus
two at the start of execution)?  That could slow things down quite a
bit.

I don't think it'll matter much for this particular case, once I get
the basename/dirname patches in, as 'expr' will be invoked only on
ancient machines afterwards.  But I worry about the precedent for
other programs.



reply via email to

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