cons-discuss
[Top][All Lists]
Advanced

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

Re: Dependency flaw in cons (and scons) ?


From: Johan Holmberg
Subject: Re: Dependency flaw in cons (and scons) ?
Date: Fri, 22 Feb 2002 13:59:29 +0100 (MET)

On Thu, 21 Feb 2002, Steven Knight wrote:
>
> > And how should it work instead ?
>
> It should rebuild when you change from one input file to another.
>
> > And implemented how ?
>
> The build::multi package should generate different build signatures
> for the individual targets in the list.  This would probably be in the
> scriptsig subroutine.  Then other targets using those signatures would
> get the right change information if either the command or the file
> changed.
>

I wonder if this may be a bigger "loophole" than I first thought.

As you mentioned the problem is that several "targets" get exactly
the same signature. But this can occur in other situations than with
"Command" and multiple targets. Consider this case:

        $e->Command('foo.c', 'foo_and_bar.c', "cp %< %>");
        $e->Command('bar.c', 'foo_and_bar.c', "cp %< %>");

        @foo_o = $e->Objects("foo.c");
        @bar_o = $e->Objects("bar.c");

        $e->Command('foo_or_bar.o', 'foo.o', "/usr/bin/cp %< %>");

What should happen if I change 'foo.o' to 'bar.o' in the last
"Command" above ?

Should 'foo_or_bar.o' still be "up-to-date" ?

( I know several compilers where the name of the source file
  matters, for example by giving the "module name" of the object
  file. This later affect the linker ... )

Maybe this is just another argument for "content signatures" !?

/Johan Holmberg





reply via email to

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