wscript 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. # Thomas Nagy, 2008-2012 (ita)
  4. from waflib import Build, TaskGen
  5. VERSION='0.0.1'
  6. APPNAME='cc_test'
  7. top = '.'
  8. out = 'build'
  9. def options(opt):
  10. opt.load('compiler_cxx')
  11. def configure(conf):
  12. conf.load('compiler_cxx doxygen')
  13. if not conf.env.DOXYGEN:
  14. conf.fatal('doxygen is required, install it')
  15. # NOTES:
  16. #
  17. # 1. The test.conf file has "OUTPUT_DIRECTORY" commented
  18. #
  19. # 2. Doxygen parameters may be passed using pars attribute
  20. # e.g. pars={'EXCLUDE_PATTERNS': '*.foo'}
  21. #
  22. # 3. if you want to build the docs in another command, use something like:
  23. # if bld.cmd == 'doxy': in the build
  24. #
  25. def build(bld):
  26. # if the documentation is to packed, simply set doxy_tar to the filename
  27. bld(
  28. features='doxygen',
  29. doxyfile='test.conf',
  30. install_path='${PREFIX}/doc')
  31. # and additional targets
  32. bld(features='cxx cxxshlib', source='subdir/c.cpp', target='somelib')
  33. # example for the NOTES point #3
  34. from waflib import Build
  35. class doxy(Build.BuildContext):
  36. fun = 'build'
  37. cmd = 'doxy'