[Scons-dev] Accommodating dependency cycles.

William Blevins wblevins001 at gmail.com
Wed Mar 22 22:43:48 EDT 2017


Oh, that's true. It depends on itself. It is not a chain per say: A <--> A.
Yeah, that is bizarre. I assume he messed up the example, but I copied it
verbatim.

On Wed, Mar 22, 2017 at 7:39 PM, Gary Oberbrunner <garyo at oberbrunner.com>
wrote:

>
> On Wed, Mar 22, 2017 at 6:15 PM, William Blevins <wblevins001 at gmail.com>
> wrote:
>
>> //source.cpp
>> #include "source.gen.h"
>> int main() { return 0; }
>>
>> //SConstruct
>> e = Environment()
>> e.Command("source.gen.h", "source.cpp", Copy('$TARGET', '$SOURCE')) #
>> "generator"
>> e.Program("source.cpp")
>>
>> This code works fine in Scons 2.1, but Scons 2.5.1 produce error:
>> scons: *** Found dependency cycle(s):
>>   source.gen.h -> source.gen.h
>>
>> If I'm reading this correctly, I don't see a cycle.
> "source" depends on source.cpp and source.gen.h.
> source.gen.h depends on source.cpp.
> source.cpp is a source, doesn't depend on anything.
> Now source.gen.h includes itself, which is weird, but shouldn't all by
> itself cause a loop as long as the scanner knows it's already seen that
> file.
> source.gen.h should definitely not depend on itself.
>
> (Not saying the current code doesn't detect a cycle, just that in the
> abstract there shouldn't actually be one.)
>
>
> --
> Gary
>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> https://pairlist2.pair.net/mailman/listinfo/scons-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/scons-dev/attachments/20170322/f7e8541c/attachment.html>


More information about the Scons-dev mailing list