diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-10-05 11:12:45 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-10-05 11:12:45 -0700 |
commit | 417d47d0482cc63f97c1b5fb95be40e993539b1e (patch) | |
tree | 5483107860e7fdc453905c4db0281c85ac6fb32c | |
parent | f7bab2b692cfa4cdf33185c123404848c268d02b (diff) |
path fixes
-rwxr-xr-x | emscripten.py | 4 | ||||
-rw-r--r-- | third_party/demangler.py | 4 | ||||
-rwxr-xr-x | tools/bindings_generator.py | 4 | ||||
-rwxr-xr-x | tools/dead_function_eliminator.py | 4 | ||||
-rwxr-xr-x | tools/emmaken.py | 4 | ||||
-rwxr-xr-x | tools/emmakenxx.py | 4 | ||||
-rwxr-xr-x | tools/exec_llvm.py | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/emscripten.py b/emscripten.py index e7cf1fcc..3fadf82b 100755 --- a/emscripten.py +++ b/emscripten.py @@ -14,12 +14,12 @@ from tools import shared TEMP_FILES_TO_CLEAN = [] +__rootpath__ = os.path.abspath(os.path.dirname(__file__)) def path_from_root(*pathelems): """Returns the absolute path for which the given path elements are relative to the emscripten root. """ - rootpath = os.path.abspath(os.path.dirname(__file__)) - return os.path.join(rootpath, *pathelems) + return os.path.join(__rootpath__, *pathelems) def get_temp_file(suffix): diff --git a/third_party/demangler.py b/third_party/demangler.py index d5e52c39..d875d9a5 100644 --- a/third_party/demangler.py +++ b/third_party/demangler.py @@ -21,9 +21,9 @@ JS_ENGINE_PARAMS=[] import os, sys, subprocess, re -abspath = os.path.abspath(os.path.dirname(__file__)) +__rootpath__ = 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))) + return os.path.join(os.path.sep, *(__rootpath__.split(os.sep)[:-1] + list(pathelems))) exec(open(path_from_root('tools', 'shared.py'), 'r').read()) data = open(sys.argv[1], 'r').readlines() diff --git a/tools/bindings_generator.py b/tools/bindings_generator.py index 4c4bfd3d..a40cf136 100755 --- a/tools/bindings_generator.py +++ b/tools/bindings_generator.py @@ -47,9 +47,9 @@ NOTE: ammo.js is currently the biggest consumer of this code. For some import os, sys, glob, re +__rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def path_from_root(*pathelems): - rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) - return os.path.join(rootpath, *pathelems) + return os.path.join(__rootpath__, *pathelems) exec(open(path_from_root('tools', 'shared.py'), 'r').read()) # Find ply and CppHeaderParser diff --git a/tools/dead_function_eliminator.py b/tools/dead_function_eliminator.py index 9106f8b7..252ba697 100755 --- a/tools/dead_function_eliminator.py +++ b/tools/dead_function_eliminator.py @@ -11,9 +11,9 @@ to remove them before Emscripten runs. import os, sys, re +__rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def path_from_root(*pathelems): - rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) - return os.path.join(rootpath, *pathelems) + return os.path.join(__rootpath__, *pathelems) exec(open(path_from_root('tools', 'shared.py'), 'r').read()) infile = sys.argv[1] diff --git a/tools/emmaken.py b/tools/emmaken.py index 29268ae2..f54f38f1 100755 --- a/tools/emmaken.py +++ b/tools/emmaken.py @@ -59,9 +59,9 @@ import subprocess print >> sys.stderr, 'emmaken.py: ', ' '.join(sys.argv) +__rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def path_from_root(*pathelems): - rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) - return os.path.join(rootpath, *pathelems) + return os.path.join(__rootpath__, *pathelems) exec(open(path_from_root('tools', 'shared.py'), 'r').read()) # If this is a configure-type thing, just do that diff --git a/tools/emmakenxx.py b/tools/emmakenxx.py index 0fd01d62..31658df2 100755 --- a/tools/emmakenxx.py +++ b/tools/emmakenxx.py @@ -6,9 +6,9 @@ see emmaken.py import os, sys +__rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def path_from_root(*pathelems): - rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) - return os.path.join(rootpath, *pathelems) + return os.path.join(__rootpath__, *pathelems) exec(open(path_from_root('tools', 'shared.py'), 'r').read()) emmaken = path_from_root('tools', 'emmaken.py') diff --git a/tools/exec_llvm.py b/tools/exec_llvm.py index 04801649..1b1bba1b 100755 --- a/tools/exec_llvm.py +++ b/tools/exec_llvm.py @@ -36,9 +36,9 @@ the .ll into native code. This can be done as follows: import os, sys from subprocess import Popen, PIPE, STDOUT +__rootpath__ = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) def path_from_root(*pathelems): - rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) - return os.path.join(rootpath, *pathelems) + return os.path.join(__rootpath__, *pathelems) exec(open(path_from_root('tools', 'shared.py'), 'r').read()) Popen([LLVM_OPT, sys.argv[1], '-strip-debug', '-o=' + sys.argv[1]+'.clean.bc']).communicate()[0] |