[Scons-users] Generated sources

William Blevins wblevins001 at gmail.com
Tue Dec 8 11:06:05 EST 2015


Rob,

I believe you are looking for something like this?

https://bitbucket.org/scons/scons/wiki/DynamicSourceGenerator
https://bitbucket.org/scons/scons/wiki/NonDeterministicDependencies


On Tue, Dec 8, 2015 at 3:29 PM, Bill Deegan <bill at baddogconsulting.com>
wrote:

> Rob,
>
> Doesn't the swig builder return all the proper File Nodes?
> An
> env.Depends(my jar, output of swig) should then be sufficient.
> Or you can filter the output File nodes by file extension and make sure
> they get passed to your env.Jar()
>
> -Bill
>

The issue that people have with Java and generated sources are that Java ->
Class behavior is 1:N, and the Java builder must parse all *.java files in
order to create a valid target list; thus, until SWIG creates the *.java
files, the SCons DAG is incomplete.

I have been wanting to propose changing the current Java builder paradigm
for a while. I think that we should mimic the Ceylon model. Make *.class
files intermediate byproducts. This takes care of the common issues SCons
faces with the current Java builder approach. I have discussed this a few
times in the mailing lists. I think it is worth discussing further.


>
>
> On Tue, Dec 8, 2015 at 10:13 AM, Rob Boehne <robb at datalogics.com> wrote:
>
>> Scons users,
>>
>> I have a project that takes C++ classes, and using SWIG, generates Java
>> sources compiled and packaged into jar files.
>> Currently this project re-executes scons to ensure the sources are
>> generated before the dependency tree containing the Java sources is created.
>> A while ago, when the SCons Wiki was in a different place, I recall
>> seeing a reference to a technique that generated a file containing a list
>> of the generated sources, but recently I’ve been unable to find any
>> references to this.
>> Can anyone point me in the right direction?  An example would be stellar.
>>
>> Thanks,
>>
>> Rob Boehne
>>
>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20151208/2be9c395/attachment.html>


More information about the Scons-users mailing list