summaryrefslogtreecommitdiff
path: root/deps/v8
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2012-11-20 17:28:28 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2012-11-20 22:47:45 +0100
commit1e738c5ef2cb5a1bf5794bb044114991e057d5e6 (patch)
tree396f3bd260d86ab353056a9365e0a76a69b6c9a0 /deps/v8
parent815a181d03641573a92441d31764f53b0f6e778e (diff)
downloadnode-new-1e738c5ef2cb5a1bf5794bb044114991e057d5e6.tar.gz
build: make python executable configurable
Upstreamed in https://codereview.chromium.org/11418101/ Fixes #4287.
Diffstat (limited to 'deps/v8')
-rw-r--r--deps/v8/Makefile9
-rw-r--r--deps/v8/build/common.gypi3
-rw-r--r--deps/v8/src/d8.gyp2
-rw-r--r--deps/v8/test/cctest/cctest.gyp2
-rw-r--r--deps/v8/tools/gyp/v8.gyp6
5 files changed, 14 insertions, 8 deletions
diff --git a/deps/v8/Makefile b/deps/v8/Makefile
index 8db3193860..f688f18b7c 100644
--- a/deps/v8/Makefile
+++ b/deps/v8/Makefile
@@ -24,6 +24,7 @@
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+PYTHON ?= python
# Variable default definitions. Override them by exporting them in your shell.
@@ -112,6 +113,8 @@ ifeq ($(hardfp), on)
GYPFLAGS += -Dv8_use_arm_eabi_hardfloat=true
endif
+GYPFLAGS += "-Dpython=$(PYTHON)"
+
# ----------------- available targets: --------------------
# - "dependencies": pulls in external dependencies (currently: GYP)
# - any arch listed in ARCHES (see below)
@@ -179,7 +182,7 @@ $(BUILDS): $(OUTDIR)/Makefile.$$(basename $$@)
@$(MAKE) -C "$(OUTDIR)" -f Makefile.$(basename $@) \
CXX="$(CXX)" LINK="$(LINK)" \
BUILDTYPE=$(shell echo $(subst .,,$(suffix $@)) | \
- python -c "print raw_input().capitalize()") \
+ $(PYTHON) -c "print raw_input().capitalize()") \
builddir="$(shell pwd)/$(OUTDIR)/$@"
native: $(OUTDIR)/Makefile.native
@@ -250,14 +253,14 @@ clean: $(addsuffix .clean, $(ARCHES) $(ANDROID_ARCHES)) native.clean
OUT_MAKEFILES = $(addprefix $(OUTDIR)/Makefile.,$(ARCHES))
$(OUT_MAKEFILES): $(GYPFILES) $(ENVFILE)
GYP_GENERATORS=make \
- build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
+ $(PYTHON) build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. \
-Dv8_target_arch=$(subst .,,$(suffix $@)) \
-S.$(subst .,,$(suffix $@)) $(GYPFLAGS)
$(OUTDIR)/Makefile.native: $(GYPFILES) $(ENVFILE)
GYP_GENERATORS=make \
- build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
+ $(PYTHON) build/gyp/gyp --generator-output="$(OUTDIR)" build/all.gyp \
-Ibuild/standalone.gypi --depth=. -S.native $(GYPFLAGS)
must-set-ANDROID_NDK_ROOT_OR_TOOLCHAIN:
diff --git a/deps/v8/build/common.gypi b/deps/v8/build/common.gypi
index 7997c54d3c..426d625675 100644
--- a/deps/v8/build/common.gypi
+++ b/deps/v8/build/common.gypi
@@ -103,6 +103,9 @@
# Interpreted regexp engine exists as platform-independent alternative
# based where the regular expression is compiled to a bytecode.
'v8_interpreted_regexp%': 0,
+
+ # Name of the python executable.
+ 'python%': 'python',
},
'target_defaults': {
'conditions': [
diff --git a/deps/v8/src/d8.gyp b/deps/v8/src/d8.gyp
index a8361e6b4e..2aa94ccf92 100644
--- a/deps/v8/src/d8.gyp
+++ b/deps/v8/src/d8.gyp
@@ -99,7 +99,7 @@
'<(SHARED_INTERMEDIATE_DIR)/d8-js.cc',
],
'action': [
- 'python',
+ '<(python)',
'../tools/js2c.py',
'<@(_outputs)',
'D8',
diff --git a/deps/v8/test/cctest/cctest.gyp b/deps/v8/test/cctest/cctest.gyp
index 66d848c5c1..7624d5b5d6 100644
--- a/deps/v8/test/cctest/cctest.gyp
+++ b/deps/v8/test/cctest/cctest.gyp
@@ -187,7 +187,7 @@
'<(generated_file)',
],
'action': [
- 'python',
+ '<(python)',
'../../tools/js2c.py',
'<@(_outputs)',
'TEST', # type
diff --git a/deps/v8/tools/gyp/v8.gyp b/deps/v8/tools/gyp/v8.gyp
index 17ced879ef..d57672c57a 100644
--- a/deps/v8/tools/gyp/v8.gyp
+++ b/deps/v8/tools/gyp/v8.gyp
@@ -796,7 +796,7 @@
'<(SHARED_INTERMEDIATE_DIR)/libraries.cc',
],
'action': [
- 'python',
+ '<(python)',
'../../tools/js2c.py',
'<@(_outputs)',
'CORE',
@@ -814,7 +814,7 @@
'<(SHARED_INTERMEDIATE_DIR)/experimental-libraries.cc',
],
'action': [
- 'python',
+ '<(python)',
'../../tools/js2c.py',
'<@(_outputs)',
'EXPERIMENTAL',
@@ -844,7 +844,7 @@
'<(SHARED_INTERMEDIATE_DIR)/debug-support.cc',
],
'action': [
- 'python',
+ '<(python)',
'../../tools/gen-postmortem-metadata.py',
'<@(_outputs)',
'<@(heapobject_files)'