Debian Codegraph @

examples/a/wscript

raw
1 ## -*- python -*-
2
3 def build(bld):
4 ## manual code generation using simple pybindgen API calls
5 gen = bld(
6 features='command',
7 source='modulegen.py',
8 target='amodule.cc',
9 command='${PYTHON} ${SRC[0]} > ${TGT[0]}')
10
11 if bld.env['CXX']:
12 obj = bld(features=['cxx', 'cxxshlib', 'pyext'])
13 obj.source = [
14 'a.cc',
15 'amodule.cc'
16 ]
17 obj.target = 'a'
18 obj.install_path = None # do not install
19 obj.includes = '.'
20
21
22 if bld.env['ENABLE_PYGCCXML']:
23 ## gccxml direct generation method
24 bld(
25 features='command',
26 source='module-autogen.py a.h',
27 target='a1module.cc',
28 command='${PYTHON} ${SRC[0]} ${SRC[1]} > ${TGT[0]}')
29
30 obj = bld(features=['cxx', 'cxxshlib', 'pyext'])
31 obj.source = [
32 'a.cc',
33 'a1module.cc'
34 ]
35 obj.target = 'a1'
36 obj.install_path = None # do not install
37 obj.includes = '.'
38
39
40 ## gccxml indirect generation method
41 bld(
42 features='command',
43 source='module-autoscan.py a.h',
44 target='a2modulegen.py',
45 command='${PYTHON} ${SRC[0]} ${SRC[1]} > ${TGT[0]}')
46
47 bld(
48 features='command',
49 source='a2modulegen.py',
50 target='a2module.cc',
51 command='${PYTHON} ${SRC[0]} > ${TGT[0]}')
52
53 obj = bld(features=['cxx', 'cxxshlib', 'pyext'])
54 obj.source = [
55 'a.cc',
56 'a2module.cc'
57 ]
58 obj.target = 'a2'
59 obj.install_path = None # do not install
60 obj.includes = '.'