pyjnius/Makefile

29 lines
749 B
Makefile
Raw Normal View History

all: build_ext
2012-08-14 01:42:43 +00:00
.PHONY: build_ext tests
PYTHON=python
2019-12-05 22:57:13 +00:00
PYTEST=pytest
2012-08-14 01:42:43 +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')" )
JAVAC_OPTS=-target $(JAVA_TARGET) -source $(JAVA_TARGET)
JAVAC=javac $(JAVAC_OPTS)
ANT=ant -Dant.build.javac.source=$(JAVA_TARGET) -Dant.build.javac.target=$(JAVA_TARGET)
2012-08-14 01:42:43 +00:00
build_ext:
$(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
clean:
$(ANT) clean
2015-05-01 16:16:58 +00:00
rm -rf build jnius/config.pxi
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)