aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-05-28 09:58:08 -0700
committerAlon Zakai <alonzakai@gmail.com>2012-05-28 09:58:08 -0700
commita8db0c66afa1a348c2d26b290faaf7b3420d7dbc (patch)
tree71700e4ba034483367eedfd3240b079932e5bc06
parent712bc9041e3470920d0db6a05e5b0af85d1b78e2 (diff)
require JAVA definition in ~/.emscripten
-rw-r--r--settings.py5
-rw-r--r--tools/shared.py6
2 files changed, 7 insertions, 4 deletions
diff --git a/settings.py b/settings.py
index d317d6b4..360c9216 100644
--- a/settings.py
+++ b/settings.py
@@ -1,15 +1,18 @@
# This file will be copied to ~/.emscripten if that file doesn't exist. Or, this is that copy.
# IMPORTANT: Edit the *copy* with the right paths!
+# Note: If you put paths relative to the home directory, do not forget os.path.expanduser
EMSCRIPTEN_ROOT = os.path.expanduser('~/Dev/emscripten') # this helps projects using emscripten find it
LLVM_ROOT = os.path.expanduser('~/Dev/llvm-3.0/cbuild/bin')
# See below for notes on which JS engine(s) you need
-NODE_JS = 'node' # Note: If you put a relative path here, do not forget os.path.expanduser
+NODE_JS = 'node'
SPIDERMONKEY_ENGINE = [os.path.expanduser('~/Dev/mozilla-central/js/src/js'), '-m', '-n']
V8_ENGINE = os.path.expanduser('~/Dev/v8/d8')
+JAVA = 'java'
+
TEMP_DIR = '/tmp' # You will need to modify this on Windows
diff --git a/tools/shared.py b/tools/shared.py
index 69343cc2..30de8685 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -81,9 +81,9 @@ def check_sanity(force=False):
sys.exit(0)
try:
- subprocess.call(['java', '-version'], stdout=PIPE, stderr=PIPE)
+ subprocess.call([JAVA, '-version'], stdout=PIPE, stderr=PIPE)
except:
- print >> sys.stderr, 'WARNING: java does not seem to exist, required for closure compiler. -O2 and above will fail.'
+ print >> sys.stderr, 'WARNING: java does not seem to exist, required for closure compiler. -O2 and above will fail. You need to define JAVA in ~/.emscripten (see settings.py)'
if not os.path.exists(CLOSURE_COMPILER):
print >> sys.stderr, 'WARNING: Closure compiler (%s) does not exist, check the paths in %s. -O2 and above will fail' % (CLOSURE_COMPILER, EM_CONFIG)
@@ -830,7 +830,7 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' % { 'winfix': '' if not WINDOWS e
# Something like this (adjust memory as needed):
# java -Xmx1024m -jar CLOSURE_COMPILER --compilation_level ADVANCED_OPTIMIZATIONS --variable_map_output_file src.cpp.o.js.vars --js src.cpp.o.js --js_output_file src.cpp.o.cc.js
- args = ['java',
+ args = [JAVA,
'-Xmx1024m',
'-jar', CLOSURE_COMPILER,
'--compilation_level', 'ADVANCED_OPTIMIZATIONS',