[Scons-users] Chaining generated sources.

William Blevins wblevins001 at gmail.com
Sat Feb 22 16:26:28 EST 2014

Unfortunately, I cannot post the code without going through a lot of hoops.

The Protoc builder creates the correct source and target lists.

The issue is that the targets have not yet been created when the Java
builder attempts to *"scan" *the Protoc targets because they haven't been
created yet. Unless there is some way to make the Protoc targets
dependencies of the SCons/Tools/javac.py::Emitter (so they build
automatically when the emitter runs), then I am forced to manually Execute
the Protoc.Action (which I cannot get to work right) or I'll have to scrap
the idea entirely because either:

1) the SCons/Tools/javac.py::Emitter throws an IOError because the sources
don't yet exist to be scanned
2) the SCons/Tools/javac.py::Emitter generates the wrong target list
because it must skip the source list scanning process

It's a chicken and egg problem. Everything gets scanned prior to the
"build step" some the derived sources aren't available to be scanned. I
either need to make them forcefully built at SConscript call time or I'll
have to manually generate the derived sources and remove the protoc builder
so that the Java class list gets created correctly.


On Sat, Feb 22, 2014 at 3:45 AM, Dirk Bächle <tshortik at gmx.de> wrote:

> On 22.02.2014 00:55, William Blevins wrote:


> I may be able to work around this if

> I can force the execution of the builder immediately.


> SCons supplies an "Execute" function,

> but I may not be building the Action correctly.



> I'm not sure that this is really the way to go here. What actually should

> happen is, that the protoc builder correctly emits the list of resulting

> targets (*.java files).

> In your Sconstruct/SConscript this list should then be input to the Javac

> Builder, such that *.class files are created.


> From what I can see in your dependency trees, this last step seems to be

> missing.


> Can you post the full source code of your example, or point us to its

> repository (if on bitbucket/github/...)? Then someone can have a closer

> look. It would be helpful to see at least the SConstruct where you call the

> protoc/java stuff...


> Are you using the protoc Builder straight from the Wiki (as Code snippet),

> or did you download/clone the repo from the address given in the ToolsIndex

> ( http://www.scons.org/wiki/ToolsIndex )?


> Best regards,


> Dirk




> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140222/53d3d5dc/attachment.htm

More information about the Scons-users mailing list