aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/shared.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/shared.py b/tools/shared.py
index 58ca4ca5..ec3e8d09 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -126,6 +126,12 @@ JS_OPTIMIZER = path_from_root('tools', 'js-optimizer.js')
# Temp dir. Create a random one, unless EMCC_DEBUG is set, in which case use TEMP_DIR/emscripten_temp
+try:
+ TEMP_DIR
+except:
+ print >> sys.stderr, 'TEMP_DIR not defined in ~/.emscripten, using /tmp'
+ TEMP_DIR = '/tmp'
+
CANONICAL_TEMP_DIR = os.path.join(TEMP_DIR, 'emscripten_temp')
EMSCRIPTEN_TEMP_DIR = None