automake
[Top][All Lists]
Advanced

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

Re: PATCH: Fix dependency tracking (revised)


From: Robert Boehne
Subject: Re: PATCH: Fix dependency tracking (revised)
Date: Mon, 07 May 2001 08:20:21 -0500

Tom Tromey wrote:
> 
> >>>>> "Robert" == Robert Boehne <address@hidden> writes:
> 
> Robert> 2001-04-25  Robert Boehne <address@hidden>
> Robert>         * configure.in: Add _am_dep_true='@AMDEP_TRUE@' and AC_SUBST 
> it.
> Robert>         * automake.in: (handle_dependencies) Replace @AMDEP_TRUE@ in
> Robert>         $output_rules with @_am_dep_true@ so that @AMDEP_TRUE@ isn't
> Robert>         substituted away when automake is created by configure.
> Robert>         * depend2.am: Add @AMDEP_TRUE@ to the beginning of lines for
> Robert>         dependency tracking in the rules for object files so that
> Robert>         disabling dependency tracking with 'configure' will work.
> Robert>         * configure: Regenerate.
> 
> Thanks for this patch.
> I fixed in a different way before I saw this patch.
> Can you try the current automake?
> Your changes to depend2.am leave me thinking that maybe my fix isn't
> complete.  (Or maybe your fix is redundant?)
> 
> Tom

Tom:

The latest CVS Automake works fine for --enable-dependency-tracking,
but when --disable-dependency-tracking is specified it's still choking.
The problem is that the lines required for depcomp when dependency
tracking is used are not valid.  When the package is configured,
the Automake conditionals aren't evaluated, they are evaluated
when Automake is run on the package.  Here's a snippet:

#include $(DEPDIR)/Units_UnitsDictionary.Plo
#include $(DEPDIR)/Units_UnitsLexicon.Plo
#include $(DEPDIR)/Units_UnitsSequence_0.Plo
#include $(DEPDIR)/Units_UnitsSystem.Plo
#include $(DEPDIR)/Units_UtsSequence_0.Plo

distclean-depend:
        -rm -rf $(DEPDIR)

CXXDEPMODE = depmode=none

.cxx.o:
        source='$<' object='$@' libtool=no 
        depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' 
        $(CXXDEPMODE) $(depcomp) 
        $(CXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<

So the file depend2.am still needs to have @AMDEP_TRUE@ before
the tab on the first three lines of the rule.  Alternatively
@AMDEPBACKSLASH@ could be set to "\", but that would lengthen
compile times by running 'depcomp mode=none' on every source file.

I like the trick you used to get @AMDEP_TRUE@ to stay in
automake after configuring, I'll have to remember that.  :)

Thanks,

Robert

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

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