diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-10-05 09:49:51 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-10-05 09:49:51 -0700 |
commit | 252869f1624d58c90bcc9748464b3034dbc566da (patch) | |
tree | 8890c4e2d7c15ce74dfbfcda43bfd14314eb71b2 /tools | |
parent | 734b1450b5dc644065bd8705a5f1a7b8074cbc61 (diff) | |
parent | 19a52a996de0adb1ea598ff1ae112923f3e33fd2 (diff) |
Merge pull request #86 from SiggyBar/master
Misc fixes to make emscripten run (better) on Windows
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 | ||||
-rw-r--r-- | tools/shared.py | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/tools/bindings_generator.py b/tools/bindings_generator.py index 0a1a75cc..4c4bfd3d 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 -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))) + rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + 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 d6f96536..9106f8b7 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 -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))) + rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + 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 76c2e9c8..c04aaf30 100755 --- a/tools/emmaken.py +++ b/tools/emmaken.py @@ -59,9 +59,9 @@ import subprocess print >> sys.stderr, 'emmaken.py: ', ' '.join(sys.argv) -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))) + rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + 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 e271d765..f473a8bf 100755 --- a/tools/emmakenxx.py +++ b/tools/emmakenxx.py @@ -6,9 +6,9 @@ see emmaken.py import os, sys -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))) + rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + 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 aa18aa2b..840966e6 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 -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))) + rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + return os.path.join(rootpath, *pathelems) exec(open(path_from_root('tools', 'shared.py'), 'r').read()) print '// EXEC_LLVM: ', sys.argv diff --git a/tools/shared.py b/tools/shared.py index 83c921da..4b68555a 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -1,9 +1,9 @@ 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))) + rootpath = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) + return os.path.join(rootpath, *pathelems) CONFIG_FILE = os.path.expanduser('~/.emscripten') if not os.path.exists(CONFIG_FILE): |