diff options
Diffstat (limited to 'tools')
-rwxr-xr-x[-rw-r--r--] | tools/bindings_generator.py | 2 | ||||
-rw-r--r-- | tools/shared.py | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/bindings_generator.py b/tools/bindings_generator.py index 359244ad..d436c311 100644..100755 --- a/tools/bindings_generator.py +++ b/tools/bindings_generator.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + ''' Use CppHeaderParser to parse some C++ headers, and generate binding code for them. 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: |