Minimal support for tests and extensions in Vala
This commit is contained in:
parent
779c582058
commit
7e5dd2db32
4 changed files with 21 additions and 5 deletions
|
@ -14,13 +14,18 @@ for extension in extensions:
|
||||||
for fila in files:
|
for fila in files:
|
||||||
if fila[-2:] == '.c':
|
if fila[-2:] == '.c':
|
||||||
source += ' ' + extension + os.sep + fila
|
source += ' ' + extension + os.sep + fila
|
||||||
|
elif fila[-5:] == '.vala':
|
||||||
|
source += ' ' + extension + os.sep + fila
|
||||||
if not source:
|
if not source:
|
||||||
Utils.pprint ('RED', folder + ': No source files found')
|
Utils.pprint ('RED', folder + ': No source files found')
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if extension[-2:] != '.c':
|
if extension[-2:] == '.c':
|
||||||
continue
|
|
||||||
target = extension[:-2]
|
target = extension[:-2]
|
||||||
|
elif extension[-5:] == '.vala':
|
||||||
|
target = extension[:-5]
|
||||||
|
else:
|
||||||
|
continue
|
||||||
source = extension
|
source = extension
|
||||||
|
|
||||||
obj = bld.new_task_gen ('cc', 'shlib')
|
obj = bld.new_task_gen ('cc', 'shlib')
|
||||||
|
|
|
@ -76,7 +76,7 @@ _katze_array_add_item (KatzeArray* array,
|
||||||
{
|
{
|
||||||
GType type = G_OBJECT_TYPE (item);
|
GType type = G_OBJECT_TYPE (item);
|
||||||
|
|
||||||
g_return_if_fail (katze_array_is_a (array, type));
|
/* g_return_if_fail (katze_array_is_a (array, type)); */
|
||||||
g_object_ref (item);
|
g_object_ref (item);
|
||||||
if (g_type_is_a (type, KATZE_TYPE_ITEM))
|
if (g_type_is_a (type, KATZE_TYPE_ITEM))
|
||||||
katze_item_set_parent (item, array);
|
katze_item_set_parent (item, array);
|
||||||
|
|
|
@ -14,13 +14,18 @@ for test in tests:
|
||||||
for fila in files:
|
for fila in files:
|
||||||
if fila[-2:] == '.c':
|
if fila[-2:] == '.c':
|
||||||
source += ' ' + test + os.sep + fila
|
source += ' ' + test + os.sep + fila
|
||||||
|
elif file[-5:] == '.vala':
|
||||||
|
source += ' ' + test + os.sep + fila
|
||||||
if not source:
|
if not source:
|
||||||
Utils.pprint ('RED', folder + ': No source files found')
|
Utils.pprint ('RED', folder + ': No source files found')
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
if test[-2:] != '.c':
|
if test[-2:] == '.c':
|
||||||
continue
|
|
||||||
target = test[:-2]
|
target = test[:-2]
|
||||||
|
elif test[-5:] == '.vala':
|
||||||
|
target = test[:-5]
|
||||||
|
else:
|
||||||
|
continue
|
||||||
source = test
|
source = test
|
||||||
|
|
||||||
obj = bld.new_task_gen ('cc', 'program')
|
obj = bld.new_task_gen ('cc', 'program')
|
||||||
|
|
6
wscript
6
wscript
|
@ -25,6 +25,7 @@ except:
|
||||||
import Task
|
import Task
|
||||||
from TaskGen import extension, feature, taskgen
|
from TaskGen import extension, feature, taskgen
|
||||||
import misc
|
import misc
|
||||||
|
from Configure import find_program_impl
|
||||||
|
|
||||||
major = 0
|
major = 0
|
||||||
minor = 2
|
minor = 2
|
||||||
|
@ -86,6 +87,11 @@ def configure (conf):
|
||||||
return dirvalue
|
return dirvalue
|
||||||
|
|
||||||
conf.check_tool ('compiler_cc')
|
conf.check_tool ('compiler_cc')
|
||||||
|
# Circumvent mandatory check for valac
|
||||||
|
if find_program_impl (conf.env, 'valac'):
|
||||||
|
conf.check_tool ('vala')
|
||||||
|
else:
|
||||||
|
conf.check_message ('program', 'valac', False, False)
|
||||||
conf.check_tool ('glib2')
|
conf.check_tool ('glib2')
|
||||||
|
|
||||||
if option_enabled ('userdocs'):
|
if option_enabled ('userdocs'):
|
||||||
|
|
Loading…
Reference in a new issue