Browse Source

build: honour the PYTHON environment variable

Overrides the path to the python binary. Defaults to `python`.
v0.7.4-release
Ben Noordhuis 13 years ago
parent
commit
472a72d27f
  1. 33
      Makefile
  2. 6
      configure

33
Makefile

@ -1,4 +1,5 @@
WAF=python tools/waf-light PYTHON ?= python
WAF = $(PYTHON) tools/waf-light
web_root = node@nodejs.org:~/web/nodejs.org/ web_root = node@nodejs.org:~/web/nodejs.org/
@ -32,41 +33,41 @@ uninstall:
@$(WAF) uninstall @$(WAF) uninstall
test: all test: all
python tools/test.py --mode=release simple message $(PYTHON) tools/test.py --mode=release simple message
test-http1: all test-http1: all
python tools/test.py --mode=release --use-http1 simple message $(PYTHON) tools/test.py --mode=release --use-http1 simple message
test-valgrind: all test-valgrind: all
python tools/test.py --mode=release --valgrind simple message $(PYTHON) tools/test.py --mode=release --valgrind simple message
test-all: all test-all: all
python tools/test.py --mode=debug,release $(PYTHON) tools/test.py --mode=debug,release
make test-npm make test-npm
test-all-http1: all test-all-http1: all
python tools/test.py --mode=debug,release --use-http1 $(PYTHON) tools/test.py --mode=debug,release --use-http1
test-all-valgrind: all test-all-valgrind: all
python tools/test.py --mode=debug,release --valgrind $(PYTHON) tools/test.py --mode=debug,release --valgrind
test-release: all test-release: all
python tools/test.py --mode=release $(PYTHON) tools/test.py --mode=release
test-debug: all test-debug: all
python tools/test.py --mode=debug $(PYTHON) tools/test.py --mode=debug
test-message: all test-message: all
python tools/test.py message $(PYTHON) tools/test.py message
test-simple: all test-simple: all
python tools/test.py simple $(PYTHON) tools/test.py simple
test-pummel: all test-pummel: all
python tools/test.py pummel $(PYTHON) tools/test.py pummel
test-internet: all test-internet: all
python tools/test.py internet $(PYTHON) tools/test.py internet
test-npm: all test-npm: all
./node deps/npm/test/run.js ./node deps/npm/test/run.js
@ -146,7 +147,7 @@ distclean: docclean
check: check:
@tools/waf-light check @tools/waf-light check
VERSION=v$(shell python tools/getnodeversion.py) VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
TARNAME=node-$(VERSION) TARNAME=node-$(VERSION)
TARBALL=$(TARNAME).tar.gz TARBALL=$(TARNAME).tar.gz
PKG=out/$(TARNAME).pkg PKG=out/$(TARNAME).pkg
@ -194,10 +195,10 @@ bench-idle:
./node benchmark/idle_clients.js & ./node benchmark/idle_clients.js &
jslint: jslint:
PYTHONPATH=tools/closure_linter/ python tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/ PYTHONPATH=tools/closure_linter/ $(PYTHON) tools/closure_linter/closure_linter/gjslint.py --unix_mode --strict --nojsdoc -r lib/ -r src/ -r test/
cpplint: cpplint:
@python tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c) @$(PYTHON) tools/cpplint.py $(wildcard src/*.cc src/*.h src/*.c)
lint: jslint cpplint lint: jslint cpplint

6
configure

@ -7,6 +7,10 @@ if [ ! -z "`echo $CC | grep ccache`" ]; then
exit 1 exit 1
fi fi
if [ -z "$PYTHON" ]; then
PYTHON=python
fi
CUR_DIR=$PWD CUR_DIR=$PWD
#possible relative path #possible relative path
@ -16,6 +20,6 @@ cd "$WORKINGDIR"
WORKINGDIR=`pwd` WORKINGDIR=`pwd`
cd "$CUR_DIR" cd "$CUR_DIR"
"${WORKINGDIR}/tools/waf-light" --jobs=1 configure $* "$PYTHON" "${WORKINGDIR}/tools/waf-light" --jobs=1 configure $*
exit $? exit $?

Loading…
Cancel
Save