commit 1f8610cebe2c99223db4082a834fb814afd2b697
parent 6cf8c5aacbfb77a01e9038951f03b1431648b91d
Author: Martin von Gagern <gagern@ma.tum.de>
Date: Thu, 9 Jul 2015 14:44:01 +0200
Auto-detect python binary
We now try whether there is an executable called python2, and if so,
use that in preference to python when executing the metric computation.
Furthermore, we allow the user to specify the path of the python binary
using the PYTHON variable of make, i.e. “make PYTHON=/foo/python2 metrics”.
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
@@ -79,8 +79,11 @@ test:
./node_modules/.bin/jasmine-node test/katex-spec.js
./node_modules/.bin/jasmine-node contrib/auto-render/auto-render-spec.js
+PERL=perl
+PYTHON=$(shell python2 --version >/dev/null 2>&1 && echo python2 || echo python)
+
metrics:
- cd metrics && ./mapping.pl | ./extract_tfms.py | ./extract_ttfs.py | ./replace_line.py
+ cd metrics && $(PERL) ./mapping.pl | $(PYTHON) ./extract_tfms.py | $(PYTHON) ./extract_ttfs.py | $(PYTHON) ./replace_line.py
clean:
rm -rf build/*