aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 311e16c..286afa9 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -438,6 +438,12 @@ class Backend():
return (srcs, ofilenames, cmd)
def run_postconf_scripts(self):
+ env = {'MESON_SOURCE_ROOT' : self.environment.get_source_dir(),
+ 'MESON_BUILD_ROOT' : self.environment.get_build_dir()
+ }
+ child_env = os.environ.copy()
+ child_env.update(env)
+
for s in self.build.postconf_scripts:
- cmd = s['exe'].get_command() + [self.environment.get_source_dir(), self.environment.get_build_dir()] + s['args']
- subprocess.check_call(cmd)
+ cmd = s['exe'].get_command() + s['args']
+ subprocess.check_call(cmd, env=child_env)