2015-05-01 01:07:08 +00:00
|
|
|
all: build_ext
|
|
|
|
|
2012-08-14 01:42:43 +00:00
|
|
|
.PHONY: build_ext tests
|
2015-05-01 21:57:22 +00:00
|
|
|
|
|
|
|
PYTHON=python
|
2019-12-05 22:57:13 +00:00
|
|
|
PYTEST=pytest
|
2012-08-14 01:42:43 +00:00
|
|
|
|
2019-07-27 22:30:25 +00:00
|
|
|
JAVA_TARGET ?= $(shell $(PYTHON) -c "import re; print('1.6' if int(re.findall(r'\d+', '$(shell javac -version 2>&1)')[0]) < 12 else '1.7')" )
|
2019-07-26 13:28:39 +00:00
|
|
|
JAVAC_OPTS=-target $(JAVA_TARGET) -source $(JAVA_TARGET)
|
2015-04-30 23:36:56 +00:00
|
|
|
JAVAC=javac $(JAVAC_OPTS)
|
|
|
|
|
2019-07-26 13:28:39 +00:00
|
|
|
ANT=ant -Dant.build.javac.source=$(JAVA_TARGET) -Dant.build.javac.target=$(JAVA_TARGET)
|
2015-04-30 23:36:56 +00:00
|
|
|
|
2012-08-14 01:42:43 +00:00
|
|
|
build_ext:
|
2015-05-01 01:07:08 +00:00
|
|
|
$(ANT) all
|
2019-12-05 22:57:13 +00:00
|
|
|
$(PYTHON) setup.py build_ext --inplace -g
|
2012-08-14 01:42:43 +00:00
|
|
|
|
2015-04-30 23:36:56 +00:00
|
|
|
clean:
|
2015-05-01 01:07:08 +00:00
|
|
|
$(ANT) clean
|
2015-05-01 16:16:58 +00:00
|
|
|
rm -rf build jnius/config.pxi
|
2015-04-30 23:36:56 +00:00
|
|
|
|
2012-08-20 09:17:14 +00:00
|
|
|
html:
|
|
|
|
$(MAKE) -C docs html
|
|
|
|
|
2015-11-03 15:37:30 +00:00
|
|
|
# for use in travis; tests whatever you got.
|
|
|
|
# use PYTHON3=1 to force python3 in other environments.
|
2018-04-30 12:34:58 +00:00
|
|
|
tests:
|
2019-12-05 22:57:13 +00:00
|
|
|
(cd tests; env CLASSPATH=../build/test-classes:../build/classes PYTHONPATH=..:$(PYTHONPATH) $(PYTEST) -v)
|