aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mconf.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2019-01-07 23:10:22 +0200
committerGitHub <noreply@github.com>2019-01-07 23:10:22 +0200
commit3bf2ca483e9ca80ee81ee0a07d5f5c9f36817bb3 (patch)
tree147fac32390c09473b9aa64d3990cbbe187160bd /mesonbuild/mconf.py
parentd085002d18f64e7ba91449f8b726a00b8e728a0a (diff)
parentb82cbbdd4c6470643c383d53bd7360342e61e233 (diff)
downloadmeson-3bf2ca483e9ca80ee81ee0a07d5f5c9f36817bb3.zip
meson-3bf2ca483e9ca80ee81ee0a07d5f5c9f36817bb3.tar.gz
meson-3bf2ca483e9ca80ee81ee0a07d5f5c9f36817bb3.tar.bz2
Merge pull request #4732 from mensinda/introMesonInfo2
mintro: Added `meson-info.json` introspection information about the latest meson run
Diffstat (limited to 'mesonbuild/mconf.py')
-rw-r--r--mesonbuild/mconf.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py
index 2863b0c..b8fb3c6 100644
--- a/mesonbuild/mconf.py
+++ b/mesonbuild/mconf.py
@@ -148,6 +148,7 @@ class Conf:
def run(options):
coredata.parse_cmd_line_options(options)
builddir = os.path.abspath(os.path.realpath(options.builddir))
+ c = None
try:
c = Conf(builddir)
save = False
@@ -163,7 +164,10 @@ def run(options):
if save:
c.save()
mintro.update_build_options(c.coredata, c.build.environment.info_dir)
+ mintro.write_meson_info_file(c.build, [])
except ConfException as e:
print('Meson configurator encountered an error:')
+ if c is not None and c.build is not None:
+ mintro.write_meson_info_file(c.build, [e])
raise e
return 0