home » zplus/dokk.git
ID: 374f112b3976fe30adfdf131175973e18fe97b11
80 lines — 2K — View raw


SHELL = /bin/bash

REPOSITORY = https://github.com/twisted/twisted.git

check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/twisted
else
	$(error OUTPUT_PATH is undefined)
endif

venv:
	python3 -m venv venv

venv-3.8:
	export PYENV_VERSION=3.8
	python3 -m venv venv

venv-3.7:
	export PYENV_VERSION=3.7
	python3 -m venv venv

repository:
	git clone ${REPOSITORY} repository

twisted-23.8.0 twisted-23.10.0: check_env_vars venv repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install .[dev-release]
	cd docs
	make clean dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

twisted-22.1.0 twisted-22.2.0 twisted-22.4.0 twisted-22.8.0 twisted-22.10.0: check_env_vars venv-3.8 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install .[dev_release]
	cd docs
	make clean dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

twisted-21.2.0 twisted-21.7.0: check_env_vars venv-3.8 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install .[dev_release] "jinja2 < 3.1"
	cd docs
	make clean dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

twisted-16.4.0 twisted-16.4.1 twisted-16.5.0 twisted-16.6.0 twisted-17.1.0 twisted-17.5.0 twisted-17.9.0 twisted-18.4.0 twisted-18.7.0 twisted-18.9.0 twisted-19.2.1 twisted-19.7.0 twisted-19.10.0 twisted-20.3.0: check_env_vars venv-3.7 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install .[dev] "jinja2 < 3.1"
	cd docs
	make clean dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

twisted-14.0.2 twisted-15.0.0 twisted-15.1.0 twisted-15.2.1 twisted-15.3.0 twisted-15.4.0 twisted-15.5.0 twisted-16.0.0 twisted-16.1.1 twisted-16.2.0 twisted-16.3.2: check_env_vars venv-3.7 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install sphinx
	pip install .
	cd docs
	make clean dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

.ONESHELL:
.SUFFIXES:
.PHONY:
.DELETE_ON_ERROR: