aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-07-09 19:24:20 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-07-09 19:24:20 -0700
commit6c101f3ad806ee371f4d55d4f347535b8d33c7cb (patch)
treefa9d6995416fb2813af3c99482573a095fe6f567 /tools/shared.py
parent3a935225b9d71148529b6564bfeac20ea49ccb7d (diff)
bindings generator cleanup
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 8cb602df..9ccc2105 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -1,6 +1,10 @@
import shutil, time, os
from subprocess import Popen, PIPE, STDOUT
+abspath = os.path.abspath(os.path.dirname(__file__))
+def path_from_root(*pathelems):
+ return os.path.join(os.path.sep, *(abspath.split(os.sep)[:-1] + list(pathelems)))
+
CONFIG_FILE = os.path.expanduser('~/.emscripten')
if not os.path.exists(CONFIG_FILE):
shutil.copy(path_from_root('settings.py'), CONFIG_FILE)
@@ -17,6 +21,8 @@ LLVM_DIS_OPTS = ['-show-annotations'] # For LLVM 2.8+. For 2.7, you may need to
LLVM_INTERPRETER=os.path.expanduser(os.path.join(LLVM_ROOT, 'lli'))
LLVM_COMPILER=os.path.expanduser(os.path.join(LLVM_ROOT, 'llc'))
+BINDINGS_GENERATOR = path_from_root('tools', 'bindings_generator.py')
+
# Engine tweaks
if '-s' not in SPIDERMONKEY_ENGINE: