wscript 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. # Thomas Nagy, 2006-2010 (ita)
  4. """
  5. java example
  6. The gcj compiler has a very different command-line - see playground/gcj
  7. """
  8. VERSION = '0.0.4'
  9. APPNAME = 'java_test'
  10. top = '.'
  11. out = 'build'
  12. def options(opt):
  13. opt.load('junit', tooldir='.')
  14. def configure(conf):
  15. conf.load('java')
  16. try:
  17. ret = conf.load('junit', tooldir='.')
  18. conf.env.DO_JUNIT = True
  19. except:
  20. pass
  21. conf.check_java_class('java.io.FileOutputStream')
  22. conf.check_java_class('FakeClass')
  23. conf.env.CLASSPATH_NNN = ['aaaa.jar', 'bbbb.jar']
  24. def build(bld):
  25. bld(features = 'javac jar javadoc',
  26. srcdir = 'src/', # folder containing the sources to compile
  27. outdir = 'src', # folder where to output the classes (in the build directory)
  28. compat = '1.6', # java compatibility version number
  29. sourcepath = ['src', 'sup'],
  30. classpath = ['.', '..'],
  31. #jaropts = ['-C', 'default/src/', '.'], # can be used to give files
  32. basedir = 'src', # folder containing the classes and other files to package (must match outdir)
  33. destfile = 'foo.jar', # do not put the destfile in the folder of the java classes!
  34. use = 'NNN',
  35. # javadoc
  36. javadoc_package = ['com.meow' , 'com.meow.truc.bar', 'com.meow.truc.foo'],
  37. javadoc_output = 'javadoc',
  38. )
  39. bld.recurse('animals cats')