waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

wscript (740B)


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