|
|
@ -568,6 +568,7 @@ class MesonMain(InterpreterObject): |
|
|
|
'is_cross_build' : self.is_cross_build_method, |
|
|
|
'is_cross_build' : self.is_cross_build_method, |
|
|
|
'has_exe_wrapper' : self.has_exe_wrapper_method, |
|
|
|
'has_exe_wrapper' : self.has_exe_wrapper_method, |
|
|
|
'is_unity' : self.is_unity_method, |
|
|
|
'is_unity' : self.is_unity_method, |
|
|
|
|
|
|
|
'is_subproject' : self.is_subproject_method, |
|
|
|
'current_source_dir' : self.current_source_dir_method, |
|
|
|
'current_source_dir' : self.current_source_dir_method, |
|
|
|
'current_build_dir' : self.current_build_dir_method, |
|
|
|
'current_build_dir' : self.current_build_dir_method, |
|
|
|
'set_install_script' : self.set_install_script_method, |
|
|
|
'set_install_script' : self.set_install_script_method, |
|
|
@ -631,6 +632,9 @@ class MesonMain(InterpreterObject): |
|
|
|
def is_unity_method(self, args, kwargs): |
|
|
|
def is_unity_method(self, args, kwargs): |
|
|
|
return self.build.environment.coredata.unity |
|
|
|
return self.build.environment.coredata.unity |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def is_subproject_method(self, args, kwargs): |
|
|
|
|
|
|
|
return self.interpreter.subproject != '' |
|
|
|
|
|
|
|
|
|
|
|
class Interpreter(): |
|
|
|
class Interpreter(): |
|
|
|
|
|
|
|
|
|
|
|
def __init__(self, build, subproject='', subdir=''): |
|
|
|
def __init__(self, build, subproject='', subdir=''): |
|
|
@ -700,7 +704,6 @@ class Interpreter(): |
|
|
|
'option' : self.func_option, |
|
|
|
'option' : self.func_option, |
|
|
|
'get_option' : self.func_get_option, |
|
|
|
'get_option' : self.func_get_option, |
|
|
|
'subproject' : self.func_subproject, |
|
|
|
'subproject' : self.func_subproject, |
|
|
|
'is_subproject' : self.func_is_subproject, |
|
|
|
|
|
|
|
'pkgconfig_gen' : self.func_pkgconfig_gen, |
|
|
|
'pkgconfig_gen' : self.func_pkgconfig_gen, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -867,9 +870,6 @@ class Interpreter(): |
|
|
|
p = build.PkgConfigGenerator(libs, subdirs, name, description, version, filebase) |
|
|
|
p = build.PkgConfigGenerator(libs, subdirs, name, description, version, filebase) |
|
|
|
self.build.pkgconfig_gens.append(p) |
|
|
|
self.build.pkgconfig_gens.append(p) |
|
|
|
|
|
|
|
|
|
|
|
def func_is_subproject(self, nodes, args, kwargs): |
|
|
|
|
|
|
|
return self.subproject != '' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def func_subproject(self, nodes, args, kwargs): |
|
|
|
def func_subproject(self, nodes, args, kwargs): |
|
|
|
if len(args) != 1: |
|
|
|
if len(args) != 1: |
|
|
|
raise InterpreterException('Subproject takes exactly one argument') |
|
|
|
raise InterpreterException('Subproject takes exactly one argument') |
|
|
|