diff options
author | Jon TURNEY <[email protected]> | 2013-01-14 15:35:05 +0000 |
---|---|---|
committer | Jon TURNEY <[email protected]> | 2013-01-16 19:53:01 +0000 |
commit | e6e73089e5d78094dd5b36e37c824cc42f54c8c4 (patch) | |
tree | 8b33f463f0ea68304f049a36de3ace783f56893d /src | |
parent | 4fad211502d8fcc6a4906549e6458b3306dcc27c (diff) |
Fix mapi code generator for out-of-tree build
Use os.path.join() rather than hand-rolling it, so path is correct if
sys.argv[0] returns an absolute path.
(According to the python documentation, it's platform dependent whether
sys.argv[0] is a full pathname or not. It probably also depends on how
the process was started...)
Signed-off-by: Jon TURNEY <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mapi/mapi/mapi_abi.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mapi/mapi/mapi_abi.py b/src/mapi/mapi/mapi_abi.py index 30ffe7bc27a..c645c02f919 100644 --- a/src/mapi/mapi/mapi_abi.py +++ b/src/mapi/mapi/mapi_abi.py @@ -29,7 +29,7 @@ import sys # make it possible to import glapi import os -GLAPI = "./%s/../glapi/gen" % (os.path.dirname(sys.argv[0])) +GLAPI = os.path.join(".", os.path.dirname(sys.argv[0]), "../glapi/gen") sys.path.append(GLAPI) import re |