[Scons-users] Just abandoned an attempt to subclass Node.FS.Dir() .. alternative?

Dirk Bächle tshortik at gmx.de
Tue Dec 9 18:18:37 EST 2014


Matthew,

On 09.12.2014 23:21, Matthew Swabey wrote:
> I think you have helped me think about the problem properly - the first
> step in succeeding!
>
> [...]
> >
> The problem I have with the HDL files is that their compilation results
> in an entry in this opaque library "directory" which updates the _info
> file and creates subdirs with mangled names.

so you have something like:

   env.ModelsimIniFile('target.ini', ['source1.vhdl','source2.vhdl', 
'source3.vhdl'])

, where you run the single compiles in your Builder (probably by 
defining the required Action as Python function, or using a pseudo-Builder).
> However I can query the library with the provided binary "vdir",
> extracting lists of source files used to make things, properties of the
> compile including dates and times, etc.
In a next step, you can then "link" this INI file to whatever other 
output (libs, packages,...) you want to create additionally:

   env.ModelsimLib('myvhdl.lib', 'target.ini')

. Note, that the actual commands or actions that get executed in 
ModelsimLib() for creating the target don't have to use the given 
sources at all. The variable "$SOURCE" gets set to 'target.ini' and you 
can use it, but you don't have to. Liek above, it will trigger the 
rebuild of your 'myvhdl.lib' when the INI file changes.
It's good that you can query parts of your project info via the "vlib" 
command, but you also have to make up your mind about "when" exactly 
this should happen. Which files (children in the dependency graph) have 
to change their contents, in order to trigger a rebuild?

All other targets that get created additionally by the actions in the 
Modelsim* Builders can get marked by env.Clean(), such that they get 
removed when the target is cleaned.

There is probably more to it, and I don't really intend to provide a 
full solution for you (that's your homework ;) ). But it hopefully shows 
a little how your train of thought should look like...

Don't stop asking questions, please.

Regards,

Dirk




More information about the Scons-users mailing list