aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-10-05 21:57:42 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2014-10-05 21:57:42 +0300
commit43f5166df2c4376f453e869d658b8c97044d2b01 (patch)
tree192fc7e6fc98d04851c661f35e1975bf026932d0 /interpreter.py
parent1e12b87b931068a67110029b7e5240f4dba7e73c (diff)
downloadmeson-43f5166df2c4376f453e869d658b8c97044d2b01.zip
meson-43f5166df2c4376f453e869d658b8c97044d2b01.tar.gz
meson-43f5166df2c4376f453e869d658b8c97044d2b01.tar.bz2
Moved is_subproject into the meson object.
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/interpreter.py b/interpreter.py
index db16568..0bf8797 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -568,6 +568,7 @@ class MesonMain(InterpreterObject):
'is_cross_build' : self.is_cross_build_method,
'has_exe_wrapper' : self.has_exe_wrapper_method,
'is_unity' : self.is_unity_method,
+ 'is_subproject' : self.is_subproject_method,
'current_source_dir' : self.current_source_dir_method,
'current_build_dir' : self.current_build_dir_method,
'set_install_script' : self.set_install_script_method,
@@ -631,6 +632,9 @@ class MesonMain(InterpreterObject):
def is_unity_method(self, args, kwargs):
return self.build.environment.coredata.unity
+ def is_subproject_method(self, args, kwargs):
+ return self.interpreter.subproject != ''
+
class Interpreter():
def __init__(self, build, subproject='', subdir=''):
@@ -700,7 +704,6 @@ class Interpreter():
'option' : self.func_option,
'get_option' : self.func_get_option,
'subproject' : self.func_subproject,
- 'is_subproject' : self.func_is_subproject,
'pkgconfig_gen' : self.func_pkgconfig_gen,
}
@@ -867,9 +870,6 @@ class Interpreter():
p = build.PkgConfigGenerator(libs, subdirs, name, description, version, filebase)
self.build.pkgconfig_gens.append(p)
- def func_is_subproject(self, nodes, args, kwargs):
- return self.subproject != ''
-
def func_subproject(self, nodes, args, kwargs):
if len(args) != 1:
raise InterpreterException('Subproject takes exactly one argument')