2
# WAF build script for midori
3
# This file is licensed under the terms of the expat license, see the file EXPAT.
9
tests = os.listdir ('tests')
11
folder = 'tests' + os.sep + test
12
if os.path.isdir (folder):
13
files = os.listdir (folder)
17
if fila[-2:] == '.c' or fila[-5:] == '.vala':
18
source += ' ' + test + os.sep + fila
20
Utils.pprint ('RED', folder + ': No source files found')
23
elif test[-3:] == '.py' or test[-3:] == '.sh':
24
obj = bld.new_task_gen ('command-output')
25
obj.no_inputs = obj.no_outputs = obj.command_is_external = True
26
obj.command = ['python', 'sh'][test[-3:] == '.sh']
27
os.environ['SRCDIR'] = os.getcwd ()
28
os.environ['BLDDIR'] = '_build'
29
obj.argv = [os.path.join (os.getcwd (), folder)]
31
elif test[-2:] == '.c':
34
elif test[-5:] == '.vala':
38
Utils.pprint ('YELLOW', folder + ': Skipped')
41
obj = bld.new_task_gen ('cc', 'program')
42
obj.target = 'test-' + target
43
obj.includes = '.. ../midori ../panels'
46
obj.env.append_value ('CCFLAGS', '-w')
47
obj.vapi_dirs = '../midori ../katze'
48
obj.packages = 'glib-2.0 gio-2.0 libsoup-2.4 sqlite3 katze midori midori-core'
49
if bld.env['HAVE_GTK3']:
50
obj.packages += ' gtk+-3.0'
52
obj.packages += ' gtk+-2.0'
53
if bld.env['HAVE_WEBKIT2']:
54
obj.packages += ' webkit2gtk-3.0'
56
obj.packages += ' webkitgtk-3.0'
57
obj.uselib = 'UNIQUE LIBSOUP GIO GTK SQLITE WEBKIT LIBXML GRANITE ZEITGEIST'
58
obj.uselib_local = 'midori-c'