[Scons-users] Handling of dependencies using Scanner()

Henry Gomersall heng at cantab.net
Sat Oct 12 06:04:11 EDT 2013


On 11/10/13 22:30, Marc Joliet wrote:

>> I assumed that the scanner would automatically handle a new node that

>> >was added to the dependency tree if the suffix agreed with what the

>> >scanner already had - apparently not. Can someone confirm this?

> I think you overlooked the "recursive" option to the Scanner(). From the man

> page:

>

> "recursive

> An optional flag that specifies whether this scanner should be re-invoked on

> the dependency files returned by the scanner. When this flag is not set, the

> Node subsystem will only invoke the scanner on the file being scanned, and

> not (for example) also on the files specified by the #include lines in the

> file being scanned. recursive may be a callable function, in which case it

> will be called with a list of Nodes found and should return a list of Nodes

> that should be scanned recursively; this can be used to select a specific

> subset of Nodes for additional scanning."

>

> HTH

Thanks it does - I hadn't seen that.

Does it offer resilience to infinite recursion? My cursory perusal of
Scanner would suggest the logic isn't in there, but I'm happy to assume
that SCons takes care of it at another level.

Cheers,

Henry


More information about the Scons-users mailing list