automake
[Top][All Lists]
Advanced

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

Re: Dependency tracking thought


From: Akim Demaille
Subject: Re: Dependency tracking thought
Date: 13 May 2001 19:29:29 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

>>>>> "Tom" == Tom Tromey <address@hidden> writes:

Tom> gcc3 very nearly does exactly what automake wants in terms of
Tom> dependency tracking.

Tom> I think that ideally automake should recognize this and avoid
Tom> using depcomp when it discovers that the user is using gcc3.  In
Tom> this situation instead of invoking depcomp we would just invoke
Tom> gcc like depcomp does (with a small change):

Tom>     gcc <args> <dependency args> && mv "$tmpdepfile" "$depfile"

Tom> I don't think we need the explicit `rm $tmpdepfile' because the
Tom> whole problem is that gcc deletes it on failure.

Tom> Akim, any comments on the best approach to implementing this?
Tom> One problem I see is that detecting gcc3 in a
Tom> language-independent way is not going to be easy, at least not
Tom> without autoconf assistance.

Well, at first sight we might be doing good with the current scheme.
I might very well be underestimating some issues, but let me just
imagine :)

Say for .o:

?GENERIC?.%EXT%.o:
?!GENERIC?%OBJ%: %SOURCE%
if %AMDEP%
        source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
        depfile='$(DEPDIR)/%BASE%.Po' tmpdepfile='$(DEPDIR)/%BASE%.TPo' 
@AMDEPBACKSLASH@
        $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
?-o?    %COMPILE% %-c% %-o% %OBJ% `test -f %SOURCE% || echo 
'$(srcdir)/'`%SOURCE%
?!-o?   %COMPILE% %-c% `test -f %SOURCE% || echo '$(srcdir)/'`%SOURCE%

we can map %AMDEP% to something else than FALSE or AMDEP, but, say,
CCAMDEP, and let the

if CCAMDEP

endif CCAMDEP

magic happen.  And conditioning the mv should be quite easy too.

Am I missing something?



reply via email to

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