mirror of
https://github.com/esp8266/Arduino.git
synced 2025-09-08 06:28:00 +03:00
Makefile new rule: 'make distclean' removes virtualenv attempt to use python3 (python2 is still default)
24 lines
572 B
Makefile
24 lines
572 B
Makefile
PYTHON_ENV_DIR=virtualenv
|
|
TEST_EXECUTABLE=test/test
|
|
PYTHON ?= python3
|
|
|
|
all: test
|
|
|
|
install: $(PYTHON_ENV_DIR)
|
|
|
|
clean:
|
|
rm -rf $(PYTHON_ENV_DIR)
|
|
rm -rf $(TEST_EXECUTABLE)
|
|
|
|
$(PYTHON_ENV_DIR):
|
|
virtualenv --python=$(PYTHON) --no-site-packages $(PYTHON_ENV_DIR)
|
|
. $(PYTHON_ENV_DIR)/bin/activate && pip install -r requirements.txt
|
|
|
|
test: $(TEST_EXECUTABLE) $(PYTHON_ENV_DIR)
|
|
. $(PYTHON_ENV_DIR)/bin/activate && python runner.py -e $(TEST_EXECUTABLE) -m test/test.py
|
|
|
|
$(TEST_EXECUTABLE): test/test.cpp
|
|
g++ -std=c++11 -Isrc -o $@ test/test.cpp
|
|
|
|
.PHONY: test clean install all
|