automake
[Top][All Lists]
Advanced

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

Re: How to speed up 'automake'


From: Jan Engelhardt
Subject: Re: How to speed up 'automake'
Date: Tue, 3 May 2022 10:08:01 +0200 (CEST)
User-agent: Alpine 2.25 (LSU 592 2021-09-18)

On Monday 2022-05-02 22:52, Karl Berry wrote:

>    -  @echo '# dummy' >$@-t && $(am__mv) $@-t $@
>    +  @: >>$@
>
>2) without the mv I fear we are no longer noticing write failure. -k

I see no reason why mv would be so crucial.

Case 1. Lack of permission. The ">" operation is the one that fails, $? is
set. mv is never executed due to &&.

        09:53 f3:/etc $ >/etc/passwd
        bash: /etc/passwd: Permission denied
        09:53 f3:/etc $ echo $?
        1

        (dash)
        $ >/etc/passwd
        dash: 1: cannot create /etc/passwd: Permission denied
        $ echo $?
        2

Case 2. Disk is chock-full. The ">" operation is the one that fails,
$? is set once again.

        09:35 f3:/mnt $ : >>9x
        bash: 9x: No space left on device
        09:35 f3:/mnt $ echo $?
        1

        (dash)
        $ : >>x2
        dash: 5: cannot create x2: No space left on device
        $ echo $?
        2

Case 3. ">" succeeds and the disk becomes full while "echo" executes.

        (bash builtin)
        09:56 f3:/mnt $ echo foo >x9; echo $?
        bash: echo: write error: No space left on device
        1

        (dash builtin)
        $ echo foo >x9; echo $?
        dash: 1: echo: echo: I/O error
        1

        (separate program)
        $ /bin/echo foo >x9; echo $?
        /bin/echo: write error: No space left on device
        1


>1) does it actually speed anything up?

I created a dummy project with 50001 dummy .c files on short order.
On i5-1135G7 CPU with bash, ./configure runs in (unscientifically
measured) 144s wall seoncds. After modifying the innards of
Makefile.in with the proposed change, ./configure now runs in 101s.



reply via email to

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