Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
build: honour the PYTHON environment variable
Overrides the path to the python binary. Defaults to `python`.
  • Loading branch information
bnoordhuis committed Jan 8, 2012
1 parent 9ef3c62 commit 472a72d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 17 deletions.
33 changes: 17 additions & 16 deletions 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/

Expand Down Expand Up @@ -32,41 +33,41 @@ uninstall:
@$(WAF) uninstall

test: all
python tools/test.py --mode=release simple message
$(PYTHON) tools/test.py --mode=release simple message

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
python tools/test.py --mode=release --valgrind simple message
$(PYTHON) tools/test.py --mode=release --valgrind simple message

test-all: all
python tools/test.py --mode=debug,release
$(PYTHON) tools/test.py --mode=debug,release
make test-npm

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
python tools/test.py --mode=debug,release --valgrind
$(PYTHON) tools/test.py --mode=debug,release --valgrind

test-release: all
python tools/test.py --mode=release
$(PYTHON) tools/test.py --mode=release

test-debug: all
python tools/test.py --mode=debug
$(PYTHON) tools/test.py --mode=debug

test-message: all
python tools/test.py message
$(PYTHON) tools/test.py message

test-simple: all
python tools/test.py simple
$(PYTHON) tools/test.py simple

test-pummel: all
python tools/test.py pummel
$(PYTHON) tools/test.py pummel

test-internet: all
python tools/test.py internet
$(PYTHON) tools/test.py internet

test-npm: all
./node deps/npm/test/run.js
Expand Down Expand Up @@ -146,7 +147,7 @@ distclean: docclean
check:
@tools/waf-light check

VERSION=v$(shell python tools/getnodeversion.py)
VERSION=v$(shell $(PYTHON) tools/getnodeversion.py)
TARNAME=node-$(VERSION)
TARBALL=$(TARNAME).tar.gz
PKG=out/$(TARNAME).pkg
Expand Down Expand Up @@ -194,10 +195,10 @@ bench-idle:
./node benchmark/idle_clients.js &

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:
@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

Expand Down
6 changes: 5 additions & 1 deletion configure
Expand Up @@ -7,6 +7,10 @@ if [ ! -z "`echo $CC | grep ccache`" ]; then
exit 1
fi

if [ -z "$PYTHON" ]; then
PYTHON=python
fi

CUR_DIR=$PWD

#possible relative path
Expand All @@ -16,6 +20,6 @@ cd "$WORKINGDIR"
WORKINGDIR=`pwd`
cd "$CUR_DIR"

"${WORKINGDIR}/tools/waf-light" --jobs=1 configure $*
"$PYTHON" "${WORKINGDIR}/tools/waf-light" --jobs=1 configure $*

exit $?

0 comments on commit 472a72d

Please sign in to comment.