~people-project/people-core/deep-refactoring

37 by Ali Sabil
- Added a WAF based build system
1
#!/usr/bin/env python
2
348 by Ali Sabil
- Post release version bump
3
VERSION='0.1.0'
37 by Ali Sabil
- Added a WAF based build system
4
VERSION_MAJOR_MINOR =  ".".join(VERSION.split(".")[0:2])
348 by Ali Sabil
- Post release version bump
5
VERSION_LIBTOOL =  "0.1.0"
37 by Ali Sabil
- Added a WAF based build system
6
APPNAME='people'
7
8
srcdir = '.'
9
blddir = '_build_'
10
11
def set_options(opt):
12
    opt.tool_options('compiler_cc')
336.1.26 by Ali Sabil
- Updated waf to trunk
13
    opt.tool_options('gnu_dirs')
37 by Ali Sabil
- Added a WAF based build system
14
15
def configure(conf):
336.1.26 by Ali Sabil
- Updated waf to trunk
16
    conf.check_tool('compiler_cc vala gnu_dirs')
37 by Ali Sabil
- Added a WAF based build system
17
336.1.26 by Ali Sabil
- Updated waf to trunk
18
    conf.check_cfg(package='glib-2.0', uselib_store='GLIB',
19
            atleast_version='2.14.0', mandatory=True, args='--cflags --libs')
20
    conf.check_cfg(package='gobject-2.0', uselib_store='GOBJECT',
21
            atleast_version='2.14.0', mandatory=True, args='--cflags --libs')
22
    conf.check_cfg(package='dbus-glib-1', uselib_store='DBUS_GLIB',
23
            atleast_version='0.74', mandatory=True, args='--cflags --libs')
24
    conf.check_cfg(package='gee-1.0', uselib_store='GEE',
25
            atleast_version='0.1.3', mandatory=True, args='--cflags --libs')
372 by Ali Sabil
- Added core-1.0 to the list of dependencies
26
    conf.check_cfg(package='core-1.0', uselib_store='CORE',
27
            atleast_version='0.1.0', mandatory=True, args='--cflags --libs')
336.1.26 by Ali Sabil
- Updated waf to trunk
28
    conf.check_cfg(package='sqlite3', uselib_store='SQLITE',
29
            atleast_version='3.2.0', mandatory=True, args='--cflags --libs')
30
    conf.check_cfg(package='libsoup-2.4', uselib_store='SOUP',
31
            atleast_version='2.4.1', mandatory=True, args='--cflags --libs')
32
    conf.check_cfg(package='libxml-2.0', uselib_store='XML',
33
            atleast_version='2.6.31', mandatory=True, args='--cflags --libs')
34
    conf.check_cfg(package='json-glib-1.0', uselib_store='JSON',
35
            atleast_version='0.6.0', mandatory=True, args='--cflags --libs')
37 by Ali Sabil
- Added a WAF based build system
36
37
    conf.define('PACKAGE', APPNAME)
38
    conf.define('PACKAGE_NAME', APPNAME)
39
    conf.define('PACKAGE_STRING', APPNAME + '-' + VERSION)
40
    conf.define('PACKAGE_VERSION', APPNAME + '-' + VERSION)
41
42
    conf.define('VERSION', VERSION)
43
    conf.define('VERSION_MAJOR_MINOR', VERSION_MAJOR_MINOR)
44
45
def build(bld):
269 by Ali Sabil
- Merged an reorganized the libpeople-backend and libpeople-backend-helper into people-libs/people/base
46
    bld.add_subdirs('people-libs')
372 by Ali Sabil
- Added core-1.0 to the list of dependencies
47
    #bld.add_subdirs('backends')
48
    #bld.add_subdirs('people')
49
    #bld.add_subdirs('daemon')
37 by Ali Sabil
- Added a WAF based build system
50
51
def shutdown():
335 by Ali Sabil
- Updated the root wscript to not import Object
52
    import UnitTest
37 by Ali Sabil
- Added a WAF based build system
53
    unittest = UnitTest.unit_test()
38 by Ali Sabil
- Made waf check display the tests details
54
    unittest.want_to_see_test_output = True
48.1.2 by Ali Sabil
- Fixed the Keyfile test-ab suite
55
    unittest.want_to_see_test_error = True
37 by Ali Sabil
- Added a WAF based build system
56
    unittest.run()
57
    unittest.print_results()
336.1.26 by Ali Sabil
- Updated waf to trunk
58
59
60
61
62
import Build
63
64
def make_test(bld, name, uselib='', is_unit_test=True):
65
	test = bld.new_task_gen('cc', 'program')
66
	test.source = '%s.vala' % name
67
	test.uselib_local = 'test-it.static ' + uselib
68
	test.target = name
69
	test.unit_test = is_unit_test
70
	test.install_path = None
71
	return test
72
Build.BuildContext.make_test = make_test