mirror of https://gitlab.com/ita1024/waf.git
hybrid builds
This commit is contained in:
parent
015ad7349b
commit
66c28e3578
|
@ -1,3 +1,5 @@
|
||||||
|
|
||||||
all:
|
all:
|
||||||
touch ../build/just_make/foo.so
|
echo "int foo() {return 2;} " > ../build/just_make_mk.c
|
||||||
|
gcc -shared ../build/just_make_mk.c -o ../build/just_make/libfoo.so
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
int foo();
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
return foo();
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
#! /usr/bin/env python
|
#! /usr/bin/env python
|
||||||
|
|
||||||
|
from waflib import Build
|
||||||
def build(bld):
|
def build(bld):
|
||||||
|
|
||||||
# Call make for building, but keep waf for install/uninstall
|
# Call make for building, but keep waf for install/uninstall
|
||||||
|
@ -20,3 +21,9 @@ def build(bld):
|
||||||
# the make command will be called only once
|
# the make command will be called only once
|
||||||
bld(rule=make_all, always=True, name='call make')
|
bld(rule=make_all, always=True, name='call make')
|
||||||
|
|
||||||
|
# for a hybrid build...
|
||||||
|
bld.post_mode = Build.POST_LAZY
|
||||||
|
bld.add_group()
|
||||||
|
bld.read_shlib('foo', paths=[bld.path.get_bld().abspath()])
|
||||||
|
bld.program(source='main.c', target='a', use='foo')
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
def configure(conf):
|
def configure(conf):
|
||||||
conf.env.thecmd = 'all'
|
conf.env.thecmd = 'all'
|
||||||
|
conf.load('gcc')
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
bld(rule='touch ${TGT}', target='bar.txt')
|
bld(rule='touch ${TGT}', target='bar.txt')
|
||||||
|
|
Loading…
Reference in New Issue