aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonmain.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2017-07-15 09:42:38 -0400
committerJussi Pakkanen <jpakkane@gmail.com>2017-08-02 22:01:13 +0300
commit59a35c4c53bb5f3b6b787d12767d8128e8d0fa3b (patch)
treec78094bb98624b700369f0018a4b0d557bb802dc /mesonbuild/mesonmain.py
parentfa278f351fe3d6924b4d1961f77b5b4a36e133f8 (diff)
downloadmeson-59a35c4c53bb5f3b6b787d12767d8128e8d0fa3b.zip
meson-59a35c4c53bb5f3b6b787d12767d8128e8d0fa3b.tar.gz
meson-59a35c4c53bb5f3b6b787d12767d8128e8d0fa3b.tar.bz2
Print deprecation warnings on old style commands.
Diffstat (limited to 'mesonbuild/mesonmain.py')
-rw-r--r--mesonbuild/mesonmain.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/mesonbuild/mesonmain.py b/mesonbuild/mesonmain.py
index 9f7bb0b..ed23f52 100644
--- a/mesonbuild/mesonmain.py
+++ b/mesonbuild/mesonmain.py
@@ -17,10 +17,11 @@ import time, datetime
import os.path
from . import environment, interpreter, mesonlib
from . import build
+from . import mconf, mintro, mtest, rewriter
import platform
from . import mlog, coredata
from .mesonlib import MesonException
-from .wrap import WrapMode
+from .wrap import WrapMode, wraptool
parser = argparse.ArgumentParser()
@@ -262,7 +263,7 @@ def run_script_command(args):
raise MesonException('Unknown internal command {}.'.format(cmdname))
return cmdfunc(cmdargs)
-def run(mainfile, args):
+def run(args, mainfile=None):
if sys.version_info < (3, 4):
print('Meson works correctly only with python 3.4+.')
print('You have python %s.' % sys.version)
@@ -276,7 +277,7 @@ def run(mainfile, args):
return mtest.run(remaining_args)
elif cmd_name == 'setup':
args = remaining_args
- # FALLTROUGH like it's 1972.
+ # FALLTHROUGH like it's 1972.
elif cmd_name == 'introspect':
return mintro.run(remaining_args)
elif cmd_name == 'test':
@@ -324,6 +325,8 @@ def run(mainfile, args):
else:
dir2 = '.'
try:
+ if mainfile is None:
+ sys.exit('I iz broken. Sorry.')
app = MesonApp(dir1, dir2, mainfile, handshake, options, sys.argv)
except Exception as e:
# Log directory does not exist, so just print