[Scons-users] Java builder is rebuilds when not needed

Pierre-Luc Boily pierreluc.boily at gmail.com
Wed Jan 29 11:27:37 EST 2020


Hello,

I have a case where 
1- I am creating java files from idl then
2- Compile those java files

All my java files starts with "package adacel.speech;"

--------------------------------
generated_java_target += env.Command(
                                     target='ActivateGrammar.java',
                                    
source='#sr/speech/common_dds/ActivateGrammar.idl',
                                     action=[idl_command])

classes_tgt = env.Java(target='classes',
                       source=generated_java_target)
---------------------------------

The code above generates all my class files under "classes/adacel/speech",
which is correct.

But when I start another build with following code : 
for i in classes_tgt:
    print(str(i))

I can see that all my class targets looks like this :
classes\ActivateGrammar.class

Which is incorrect.  scons tell me :
scons: building
`build\sr\speech\ContextualPostProcessor\RulesEngine\DroolsGenericModel\classes\TimeValueHolder.class'
because it doesn't exist

Scons should look under classes\adacel\speech

Am I doing something incorrect?  Is this a bug in Java builder?  As a
workaround, I though doing my own builder that takes idl that generates java
file and build it.  And within the emitter, generate all class targets that
points to correct path.  It could be faster, because in that case, I could
generate all java files and compile them at once.



--
Sent from: http://scons.1086193.n5.nabble.com/Users-f16930.html


More information about the Scons-users mailing list