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 /tools | |
parent | f7bab2b692cfa4cdf33185c123404848c268d02b (diff) |
path fixes
Diffstat (limited to 'tools')
-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 |
5 files changed, 10 insertions, 10 deletions
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] |