From 0ec2e530e10e38d29a56e1bd5d719f789cb2829f Mon Sep 17 00:00:00 2001 From: Chet Gurevitch Date: Tue, 8 Aug 2017 16:41:31 -0700 Subject: [PATCH 1/2] Don't error if build directory is already configured --- mesonbuild/mesonmain.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index ed23f5238..d4a45c17b 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -113,13 +113,13 @@ class MesonApp: priv_dir = os.path.join(build_dir, 'meson-private/coredata.dat') if os.path.exists(priv_dir): if not handshake: - msg = '''Trying to run Meson on a build directory that has already been configured. + print('''Trying to run Meson on a build directory that has already been configured. If you want to build it, just run your build command (e.g. ninja) inside the build directory. Meson will autodetect any changes in your setup and regenerate itself as required. -If you want to change option values, use the mesonconf tool instead.''' - raise RuntimeError(msg) +If you want to change option values, use the mesonconf tool instead.''') + sys.exit(0) else: if handshake: raise RuntimeError('Something went terribly wrong. Please file a bug.') From 2da2c9269825b8c0079134c3a1da6be6e0891677 Mon Sep 17 00:00:00 2001 From: Chet Gurevitch Date: Sun, 13 Aug 2017 18:53:48 -0700 Subject: [PATCH 2/2] Tell users about ninja rebuild and meson configure --- mesonbuild/mesonmain.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py index d4a45c17b..31dd37a25 100644 --- a/mesonbuild/mesonmain.py +++ b/mesonbuild/mesonmain.py @@ -116,9 +116,10 @@ class MesonApp: print('''Trying to run Meson on a build directory that has already been configured. If you want to build it, just run your build command (e.g. ninja) inside the build directory. Meson will autodetect any changes in your setup and regenerate -itself as required. +itself as required. Though it shouldn't be necessary, running ninja reconfigure +will force Meson to regenerate the build files. -If you want to change option values, use the mesonconf tool instead.''') +If you want to change option values, use meson configure instead.''') sys.exit(0) else: if handshake: