My favorites | Sign in
Logo
waf
Project hosting will be READ-ONLY Wednesday, 7AM PST due to brief network maintenance
                
New issue | Search
for
| Advanced search | Search tips
Issue 396: [gcj] it is not possible to pass more than 1 directory as source_root
1 person starred this issue and may be notified of changes. Back to list
Status:  Assigned
Owner:  ----
Type-Enhancement


Sign in to add a comment
 
Reported by francelyme, Mar 28, 2009
Re-Hello

I am trying to compile a java project split into at least 2 directories

obj.source_root = 'api/javadao/src api/javacommon/src'

but I got
Traceback (most recent call last):
  File "/home/picca/Projets/tango/tango.git/waf", line 127, in <module>
    Scripting.prepare(t, cwd, VERSION, wafdir)
  File
"/home/picca/Projets/tango/tango.git/.waf-1.5.3-84a7b2c8deedc245046d811247647197/wafadmin/Scripting.py",
line 105, in prepare
    prepare_impl(t,cwd,ver,wafdir)
  File
"/home/picca/Projets/tango/tango.git/.waf-1.5.3-84a7b2c8deedc245046d811247647197/wafadmin/Scripting.py",
line 98, in prepare_impl
    main()
  File
"/home/picca/Projets/tango/tango.git/.waf-1.5.3-84a7b2c8deedc245046d811247647197/wafadmin/Scripting.py",
line 133, in main
    fun(ctx)
  File
"/home/picca/Projets/tango/tango.git/.waf-1.5.3-84a7b2c8deedc245046d811247647197/wafadmin/Scripting.py",
line 244, in build
    return build_impl(bld)
  File
"/home/picca/Projets/tango/tango.git/.waf-1.5.3-84a7b2c8deedc245046d811247647197/wafadmin/Scripting.py",
line 258, in build_impl
    bld.compile()
  File
"/home/picca/Projets/tango/tango.git/.waf-1.5.3-84a7b2c8deedc245046d811247647197/wafadmin/Build.py",
line 128, in compile
    self.flush()
  File
"/home/picca/Projets/tango/tango.git/.waf-1.5.3-84a7b2c8deedc245046d811247647197/wafadmin/Build.py",
line 424, in flush
    obj.post()
  File
"/home/picca/Projets/tango/tango.git/.waf-1.5.3-84a7b2c8deedc245046d811247647197/wafadmin/TaskGen.py",
line 111, in post
    self.apply()
  File
"/home/picca/Projets/tango/tango.git/.waf-1.5.3-84a7b2c8deedc245046d811247647197/wafadmin/TaskGen.py",
line 102, in apply
    v()
  File "/home/picca/Projets/tango/tango.git/gcj.py", line 38, in apply_gcj
    prefix_path = source_root_node.abspath()
AttributeError: 'NoneType' object has no attribute 'abspath'

Comment 1 by tnagy1024, Mar 28, 2009
2 source roots? you must be joking
Comment 2 by francelyme, Mar 28, 2009
no the project is split into a javacommon/src/fr... and javadao/src/fr...
Comment 3 by tnagy1024, Mar 28, 2009
Then there will be two different libraries
Comment 4 by francelyme, Mar 28, 2009
actually no, the project juste split the .java files in two directory and i must
compile all files in same time to generate only one .jar.
TangoORB.jar to be precise.

files under javadao are using classes described into javacommon and vis et versa ;)
Comment 5 by tnagy1024, Apr 17, 2009
Can you give the command-lines to do that?

The current example is for compiling all at once, for compiling file by file i guess
the include paths should be given.

An alternate possibility, if all the files are compiled at once, is to use a
make-like rule.

Status: Assigned
Labels: -Type-Other Type-Enhancement
Comment 6 by francelyme, Apr 17, 2009
Yes you compile all the files at once.
I did not tried file by file. When I removed the gcjonce or something like that I
could not compile (indeed due to the include path).

so the source_root find recurcively all the files under each root directory and
compile them at once.
Comment 7 by tnagy1024, Apr 17, 2009
have you tried something like this:

src = bld.path.ant_glob('**/*.java')
bld.new_task_gen(source=src, target=foo, rule="gcj -o ${TGT} ${SRC}")

?

Comment 8 by francelyme, Apr 18, 2009
No but I will try
thanks :)
Sign in to add a comment

Hosted by Google Code