automake-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] `compile' with spaces in arguments


From: Ralf Wildenhues
Subject: Re: [PATCH] `compile' with spaces in arguments
Date: Tue, 28 Sep 2004 00:03:43 +0200
User-agent: Mutt/1.5.6+20040722i

Hi Alexandre,

* Alexandre Duret-Lutz wrote on Sun, Sep 26, 2004 at 10:33:36PM CEST:
> Sorry for the delay.

No problem.

> >>> "Ralf" == Ralf Wildenhues <address@hidden> writes:
> 
>  Ralf> *snip*
>  >> +eat=
>  >> +
>  >> +for arg
>  >> +do
>  >> +  if test -n "$eat"; then
> 
>  Ralf> Please do not use test here, since it might fork, and
>  Ralf> that several times at this point.  This enhances
>  Ralf> complaints about `compile' being slow.  `case' is safe.
> 
> I really wouldn't care about that.  test is used so much all
> around the autotools that shaking the code to avoid it seems
> pointless.  People who are annoyed by this fork should do
> themselves a favor and install some decent shell.

Sorry for being pedantic.  This fork is done
- once per argv element of a compile command (which in the no-autoheader
  case easily amounts to ~50) per source file, while configure generally
  runs once per software package.
- presumably on old and/or slow systems which have both a stupid
  compiler (no -c -o) and an old shell.
- presumably on systems where you cannot just install software (be that
  quota or any other argument irrelevant to my point).

The `compile' script does not target mainstream, fast, modern systems at
all.  On the other hand, there are packages with hundreds to thousands
of C source files.  While I would like to see a little more efficiency
within the autotools, I know I should be realistic, so I point out
possible bottlenecks only.  Even `depcomp' only has on the order of 20
forks.

FWIW, the `decent shell' argument makes me scream for shell functions in
./configure.  And for installing GNU Make (and having the autotools
depend on it).

>  Ralf> Please consider using also args with two or more consecutive spaces.
>  Ralf> Those bugs are really tedious to find (like v='a  b'; echo $v).
> 
> Thanks for the idea, I'm checking this in.

Thanks.

Regards,
Ralf




reply via email to

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