Nordlöw
Nordlöw

Reputation: 12138

Checking whether a SCons File Node is a Target Node of a Builder

In SCons, is it possible the check whether a File node, queried as File(path) is a target of a builder?

I want to use this in my Ada source code scanner to check whether a path refers to a node that has been, previously in the SConstruct/SConscript read phase, registered to be generated by a source code generation builder (also written by me).

Upvotes: 0

Views: 296

Answers (1)

Kenneth E. Bellock
Kenneth E. Bellock

Reputation: 1056

Yes, you can get that information with the has_builder method of the Node object returned from File().

File(path).has_builder()

Upvotes: 1

Related Questions