mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
docs
This commit is contained in:
parent
7515dab30e
commit
9f7330b745
@ -13,6 +13,7 @@ NEW IN WAF 1.7.0
|
||||
* Extended bld.subst() to perform simple copies to the build directory
|
||||
* Removed the default DLL_EXPORT define on gcc/g++ shared libraries
|
||||
* Calling ctx.root.ant_glob(abspath) will return results #1135
|
||||
* New case-insentive option for ant_glob #1148
|
||||
|
||||
NEW IN WAF 1.6.11
|
||||
-----------------
|
||||
|
1
playground/lint/program/a.h
Normal file
1
playground/lint/program/a.h
Normal file
@ -0,0 +1 @@
|
||||
int k = 123;
|
6
playground/lint/program/main.c
Normal file
6
playground/lint/program/main.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include "a.h"
|
||||
#include "b.h"
|
||||
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
14
playground/lint/program/wscript_build
Normal file
14
playground/lint/program/wscript_build
Normal file
@ -0,0 +1,14 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
def write_header(tsk):
|
||||
tsk.outputs[0].write('int abc = 423;')
|
||||
bld(rule=write_header, target='b.h', ext_out=['.h'])
|
||||
|
||||
bld.program(
|
||||
source = 'main.c',
|
||||
includes = '. ..',
|
||||
cflags = ['-O3'],
|
||||
defines = ['foo=bar'],
|
||||
target = 'myprogram',
|
||||
use = 'M')
|
||||
|
4
playground/lint/stlib/main.c
Normal file
4
playground/lint/stlib/main.c
Normal file
@ -0,0 +1,4 @@
|
||||
int main()
|
||||
{
|
||||
return 0;
|
||||
}
|
2
playground/lint/stlib/test_staticlib.c
Normal file
2
playground/lint/stlib/test_staticlib.c
Normal file
@ -0,0 +1,2 @@
|
||||
int k = 3;
|
||||
|
12
playground/lint/stlib/wscript_build
Normal file
12
playground/lint/stlib/wscript_build
Normal file
@ -0,0 +1,12 @@
|
||||
#! /usr/bin/env python
|
||||
|
||||
bld.stlib(
|
||||
source = 'test_staticlib.c',
|
||||
target = 'my_static_lib')
|
||||
|
||||
bld.program(
|
||||
source = 'main.c',
|
||||
target = 'test_static_link',
|
||||
includes = '.',
|
||||
use = 'my_static_lib')
|
||||
|
34
playground/lint/wscript
Normal file
34
playground/lint/wscript
Normal file
@ -0,0 +1,34 @@
|
||||
#! /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']
|
Loading…
Reference in New Issue
Block a user