diff options
author | Alon Zakai <azakai@mozilla.com> | 2011-01-14 22:44:52 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2011-01-14 22:44:52 -0800 |
commit | 9d209878f9819ffd1aa92c7306123392609db845 (patch) | |
tree | 2a6093cc6ce7fce34ea2a0473a639388b0a37d4e /emscripten.py | |
parent | 60122ddc2e157b1cf117e6e098a2fc336c92d5a7 (diff) |
refactor shared components of python tools, and add emmaken.py
Diffstat (limited to 'emscripten.py')
-rwxr-xr-x | emscripten.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/emscripten.py b/emscripten.py index a0351ab7..7a92455c 100755 --- a/emscripten.py +++ b/emscripten.py @@ -2,12 +2,14 @@ import os, sys, subprocess -COMPILER = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'src', 'compiler.js') -CONFIG_FILE = os.path.expanduser('~/.emscripten') JS_ENGINE = None -if os.path.exists(CONFIG_FILE): - exec(open(CONFIG_FILE, 'r').read()) +abspath = os.path.abspath(os.path.dirname(__file__)) +def path_from_root(*pathelems): + return os.path.join(os.path.sep, *(abspath.split(os.sep) + list(pathelems))) +exec(open(path_from_root('tools', 'shared.py'), 'r').read()) + +COMPILER = path_from_root('src', 'compiler.js') def emscripten(filename, settings): data = open(filename, 'r').read() |