aboutsummaryrefslogtreecommitdiff
path: root/meson.py
diff options
context:
space:
mode:
Diffstat (limited to 'meson.py')
-rwxr-xr-xmeson.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/meson.py b/meson.py
index fbca883..8c223e5 100755
--- a/meson.py
+++ b/meson.py
@@ -18,13 +18,9 @@ from mesonbuild import mesonmain
import sys, os
def main():
- thisfile = __file__
- if not os.path.isabs(thisfile):
- thisfile = os.path.normpath(os.path.join(os.getcwd(), thisfile))
- if __package__ == '':
- thisfile = os.path.dirname(thisfile)
-
- sys.exit(mesonmain.run(thisfile, sys.argv[1:]))
+ # Always resolve the command path so Ninja can find it for regen, tests, etc.
+ launcher = os.path.realpath(sys.argv[0])
+ return mesonmain.run(launcher, sys.argv[1:])
if __name__ == '__main__':
- main()
+ sys.exit(main())