1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#!/usr/bin/env python
VERSION='0.1.0'
VERSION_MAJOR_MINOR = ".".join(VERSION.split(".")[0:2])
VERSION_LIBTOOL = "0.1.0"
APPNAME='people'
srcdir = '.'
blddir = '_build_'
def set_options(opt):
opt.tool_options('compiler_cc')
opt.tool_options('gnu_dirs')
def configure(conf):
conf.check_tool('compiler_cc vala gnu_dirs')
conf.check_cfg(package='glib-2.0', uselib_store='GLIB',
atleast_version='2.14.0', mandatory=True, args='--cflags --libs')
conf.check_cfg(package='gobject-2.0', uselib_store='GOBJECT',
atleast_version='2.14.0', mandatory=True, args='--cflags --libs')
conf.check_cfg(package='dbus-glib-1', uselib_store='DBUS_GLIB',
atleast_version='0.74', mandatory=True, args='--cflags --libs')
conf.check_cfg(package='gee-1.0', uselib_store='GEE',
atleast_version='0.1.3', mandatory=True, args='--cflags --libs')
conf.check_cfg(package='core-1.0', uselib_store='CORE',
atleast_version='0.1.0', mandatory=True, args='--cflags --libs')
conf.check_cfg(package='sqlite3', uselib_store='SQLITE',
atleast_version='3.2.0', mandatory=True, args='--cflags --libs')
conf.check_cfg(package='libsoup-2.4', uselib_store='SOUP',
atleast_version='2.4.1', mandatory=True, args='--cflags --libs')
conf.check_cfg(package='libxml-2.0', uselib_store='XML',
atleast_version='2.6.31', mandatory=True, args='--cflags --libs')
conf.check_cfg(package='json-glib-1.0', uselib_store='JSON',
atleast_version='0.6.0', mandatory=True, args='--cflags --libs')
conf.define('PACKAGE', APPNAME)
conf.define('PACKAGE_NAME', APPNAME)
conf.define('PACKAGE_STRING', APPNAME + '-' + VERSION)
conf.define('PACKAGE_VERSION', APPNAME + '-' + VERSION)
conf.define('VERSION', VERSION)
conf.define('VERSION_MAJOR_MINOR', VERSION_MAJOR_MINOR)
def build(bld):
bld.add_subdirs('people-libs')
#bld.add_subdirs('backends')
#bld.add_subdirs('people')
#bld.add_subdirs('daemon')
def shutdown():
import UnitTest
unittest = UnitTest.unit_test()
unittest.want_to_see_test_output = True
unittest.want_to_see_test_error = True
unittest.run()
unittest.print_results()
import Build
def make_test(bld, name, uselib='', is_unit_test=True):
test = bld.new_task_gen('cc', 'program')
test.source = '%s.vala' % name
test.uselib_local = 'test-it.static ' + uselib
test.target = name
test.unit_test = is_unit_test
test.install_path = None
return test
Build.BuildContext.make_test = make_test
|