[Scons-users] java builder not working with variant directory

William Roberts bill.c.roberts at gmail.com
Wed Jun 25 18:57:44 EDT 2014


Dirk,

Yes it does. I verified that if I walk the tree myself and pass the
paths themselves that it works as expected with duplicate set to 1.

Thanks again.

Bill

On Wed, Jun 25, 2014 at 3:40 PM, Dirk Bächle <tshortik at gmx.de> wrote:
> Bill,
>
>
> On 25.06.2014 21:36, William Roberts wrote:
>>
>> I *think* i've tried that before with the same results.
>>
>> I applied the changes you suggested, and still hit the same error, can
>> you send me your modifications or a diff?
>
>
> please find my version attached. The main difference is that I use
> "duplicate=0" instead of "duplicate=1" in the top-level SConstruct (sorry, I
> forgot to tell). After looking at the sources of javac.py and Node.FS.py
> some more, I'm quite sure that this is the only way to make things work.
> Patching the Java tool or the core sources won't help, due to the underlying
> problem: In the Emitter, an os.walk() is used to collect together the single
> *.java files in all the subdirectories. But in the "build" folder (the
> variant dir), the copies of the source files haven't been created so far. So
> there is no folder tree structure to traverse for the os.walk(), and no
> *.java files can be tried to get resolved by copying/linking them from the
> corresponding source directory.
>
> This is different for C/CPP builds, because there a Glob() (or naming single
> files) is used in the source folder directly, when specifying the input
> files. So, if you use a
>
>   cls = Java(target = 'classes', source = Glob('main/*.java'))
>
> in your SConscript, the "duplicate=1" should work again. But since the
> Glob() method doesn't work recursively (yet, I'm working on it), you'd have
> to repeatedly call it for each of your Java subfolders. :(
>
> I hope this explanation makes things a little clearer for you...
>
> Regards,
>
> Dirk
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>



-- 
Respectfully,

William C Roberts


More information about the Scons-users mailing list