wscript 740 B

12345678910111213141516171819202122232425262728293031323334
  1. #! /usr/bin/env python
  2. # encoding: utf-8
  3. # Thomas Nagy, 2006-2012 (ita)
  4. # the following two variables are used by the target "waf dist"
  5. VERSION='0.0.1'
  6. APPNAME='cc_test'
  7. top = '.'
  8. def options(opt):
  9. opt.load('compiler_c')
  10. def configure(conf):
  11. conf.load('compiler_c')
  12. conf.find_program('splint', var='LINT')
  13. def build(bld):
  14. bld.env.DEFINES=['WAF=1']
  15. bld.recurse('program stlib')
  16. from waflib.TaskGen import feature, after_method
  17. @feature('c')
  18. @after_method('process_source')
  19. def add_files_to_lint(self):
  20. for x in self.compiled_tasks:
  21. self.create_task('lint', x.inputs[0])
  22. from waflib import Task
  23. class lint(Task.Task):
  24. run_str = '${LINT} ${CPPPATH_ST:INCPATHS} ${SRC}'
  25. ext_in = ['.h'] # guess why this line..
  26. before = ['c']