[Scons-dev] tracking command line argument changes in a custom tool [solved]

Ram Bhamidipaty ram at ramandgita.com
Fri Apr 11 17:00:24 EDT 2014



Quoting Ram Bhamidipaty <ram at ramandgita.com>:


> How do I track build variable changes in a tool ?

>

> In my case I have a tool that I invoke like this:

>

> env.MyTool("file.o" ["file.c"], V1=1, V2=2, ...)

>

> The tool is a bit complicated - I use Builder() objects to construct

> a file that contains the command line arguments for the compiler and

> then I use another Builder() to run the compiler. This is modeled on

> the tools for fools wiki page.

>

> The problem I am seeing is that if I change the variables used to

> invoke MyTool() scons does not rebuild the file.

>

> Question: In a tool - how does one track variable changes that would

> require the output file to be regenerated?

>


Looks like env.Value() node objects are how scons tracks things like this.
For me it works to create Value() objects and explicitly connect them to
the dependency graph with .Depends().





More information about the Scons-dev mailing list