[Scons-users] Let directory depend on file? (auto generated sources)

Dirk Bächle tshortik at gmx.de
Tue Dec 2 12:20:46 EST 2014


On 02.12.2014 17:01, Stijn De Ruyck wrote:
>
> Sorry, I can’t get this to work.
>
That's not suprising, since you're using the wrong approach. ;)

> I have a dumbed down example below:
>
> [...]
>

> Problem is of course that after a clean, source1.c and source2.c are 
> not discovered during the modify_targets emitter and not compiled... 
> Only on the second scons invocation they are seen and added to the 
> sources and built.
>
> Also, modifying mst.odl triggers the builder and recreates all files, 
> but the source1.c/2.c files aren’t recompiled…
>
You can't rely on a standard glob() in your Emitter, because the files 
that you're trying to return (generated C files) may not exist yet.

> So I don’t know where to go from here…
>
You have to parse "msl.odt" ($SOURCE) in your Emitter, and return the 
names of files that it *will* create, once the build action is run. 
That's the key...to all your current problems.

Best regards,

Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20141202/c20000c6/attachment.html>


More information about the Scons-users mailing list