summaryrefslogtreecommitdiffstats
path: root/V8Binding
diff options
context:
space:
mode:
authorFeng Qian <fqian@google.com>2009-07-06 11:23:28 -0700
committerFeng Qian <fqian@google.com>2009-07-06 11:27:41 -0700
commit4eb3ce6a411b83706d9ffd8af76351249672ed56 (patch)
treed0b34ee6e4f02222bfde1fe7dacefccf3bfe5d56 /V8Binding
parentb741e5088463400e4ee74c36b056629050d156ab (diff)
downloadexternal_webkit-4eb3ce6a411b83706d9ffd8af76351249672ed56.zip
external_webkit-4eb3ce6a411b83706d9ffd8af76351249672ed56.tar.gz
external_webkit-4eb3ce6a411b83706d9ffd8af76351249672ed56.tar.bz2
Avoid generating jsmin.pyc in the source directory.
Copy js2c.py and jsmin.py to intermediate directory first, then invoke the script there. Python generates a .pyc file in that directory.
Diffstat (limited to 'V8Binding')
-rw-r--r--V8Binding/Android.libv8.mk11
-rw-r--r--V8Binding/Android.mksnapshot.mk11
2 files changed, 18 insertions, 4 deletions
diff --git a/V8Binding/Android.libv8.mk b/V8Binding/Android.libv8.mk
index 3bb348e..8bf69fb 100644
--- a/V8Binding/Android.libv8.mk
+++ b/V8Binding/Android.libv8.mk
@@ -24,11 +24,18 @@ LOCAL_SRC_FILES := $(addprefix v8/, $(V8_LOCAL_SRC_FILES))
LOCAL_JS_LIBRARY_FILES := $(addprefix $(LOCAL_PATH)/v8/, $(V8_LOCAL_JS_LIBRARY_FILES))
+# Copy js2c.py to intermediates directory and invoke there to avoid generating
+# jsmin.pyc in the source directory
+JS2C_PY := $(intermediates)/js2c.py $(intermediates)/jsmin.py
+$(JS2C_PY): $(intermediates)/%.py : $(LOCAL_PATH)/v8/tools/%.py | $(ACP)
+ @echo "Copying $@"
+ $(copy-file-to-target)
+
LOCAL_GENERATED_SOURCES :=
# Generate libraries.cc
GEN1 := $(intermediates)/libraries.cc $(intermediates)/libraries-empty.cc
-$(GEN1): SCRIPT := $(LOCAL_PATH)/v8/tools/js2c.py
-$(GEN1): $(LOCAL_JS_LIBRARY_FILES)
+$(GEN1): SCRIPT := $(intermediates)/js2c.py
+$(GEN1): $(LOCAL_JS_LIBRARY_FILES) $(JS2C_PY)
@echo "Generating libraries.cc"
@mkdir -p $(dir $@)
python $(SCRIPT) $(GEN1) CORE $(LOCAL_JS_LIBRARY_FILES)
diff --git a/V8Binding/Android.mksnapshot.mk b/V8Binding/Android.mksnapshot.mk
index 235f509..d1379f2 100644
--- a/V8Binding/Android.mksnapshot.mk
+++ b/V8Binding/Android.mksnapshot.mk
@@ -34,10 +34,17 @@ LOCAL_SRC_FILES := $(addprefix v8/, $(V8_LOCAL_SRC_FILES))
LOCAL_JS_LIBRARY_FILES := $(addprefix $(LOCAL_PATH)/v8/, $(V8_LOCAL_JS_LIBRARY_FILES))
+# Copy js2c.py to intermediates directory and invoke there to avoid generating
+# jsmin.pyc in the source directory
+JS2C_PY := $(intermediates)/js2c.py $(intermediates)/jsmin.py
+$(JS2C_PY): $(intermediates)/%.py : $(LOCAL_PATH)/v8/tools/%.py | $(ACP)
+ @echo "Copying $@"
+ $(copy-file-to-target)
+
# Generate libraries.cc
GEN2 := $(intermediates)/libraries.cc $(intermediates)/libraries-empty.cc
-$(GEN2): SCRIPT := $(LOCAL_PATH)/v8/tools/js2c.py
-$(GEN2): $(LOCAL_JS_LIBRARY_FILES)
+$(GEN2): SCRIPT := $(intermediates)/js2c.py
+$(GEN2): $(LOCAL_JS_LIBRARY_FILES) $(JS2C_PY)
@echo "Generating libraries.cc"
@mkdir -p $(dir $@)
python $(SCRIPT) $(GEN2) CORE $(LOCAL_JS_LIBRARY_FILES)