automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, experimental/ng/dirstamp, c


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, experimental/ng/dirstamp, created. v1.12-226-g47f6060
Date: Fri, 18 May 2012 08:15:18 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=47f60607506b5b7dfdac04dcc4f3794ba0e9a16a

The branch, experimental/ng/dirstamp has been created
        at  47f60607506b5b7dfdac04dcc4f3794ba0e9a16a (commit)

- Log -----------------------------------------------------------------
commit 47f60607506b5b7dfdac04dcc4f3794ba0e9a16a
Author: Stefano Lattarini <address@hidden>
Date:   Thu May 17 11:40:49 2012 +0200

    [ng] dirstamp: use inlined parent directory creation instead
    
    Since GNU make offers an efficient and simple way to refer to the directory
    component of a target within its recipe (through the use of the automatic
    variable "$(@D)"), we can simplify the automake pre-processing a little by
    getting rid of dirstamp files creation, instead inlining the creation of any
    required parent directory for a target into the recipe of the target itself.
    
    So instead of emitting rules like:
    
        sub/foo.o: sub/foo.c sub/.dirstamp
            $(CC) $(CFLAGS) sub/foo.c
        sub/.dirstamp:
            mkdir sub && touch sub/.dirstamp
    
    we might simply emit rules like:
    
        sub/foo.o: sub/foo.c
            $(MKDIR_P) $(@D)
            $(CC) $(CFLAGS) sub/foo.c
    
    Of course, the above would be quite wasteful if we really called $(MKDIR_P)
    for every created object file, since the directory $(@D) will likely already
    exists (in an in-tree build, it will already exists, and in a VPATH build
    will exists after the first object file in it has been created).
    
    So we employ several optimization to try to avoid such extra forks when they
    are not really required, thus keeping most of the performance gains offered
    by dirstamp files, but without the added pre-processing complexity.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------


hooks/post-receive
-- 
GNU Automake



reply via email to

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