2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-19 08:29:45 +01:00
waf/playground/lint/wscript
Thomas Nagy 9f7330b745 docs
2012-04-17 21:53:01 +02:00

35 lines
740 B
Python

#! /usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2012 (ita)
# the following two variables are used by the target "waf dist"
VERSION='0.0.1'
APPNAME='cc_test'
top = '.'
def options(opt):
opt.load('compiler_c')
def configure(conf):
conf.load('compiler_c')
conf.find_program('splint', var='LINT')
def build(bld):
bld.env.DEFINES=['WAF=1']
bld.recurse('program stlib')
from waflib.TaskGen import feature, after_method
@feature('c')
@after_method('process_source')
def add_files_to_lint(self):
for x in self.compiled_tasks:
self.create_task('lint', x.inputs[0])
from waflib import Task
class lint(Task.Task):
run_str = '${LINT} ${CPPPATH_ST:INCPATHS} ${SRC}'
ext_in = ['.h'] # guess why this line..
before = ['c']