home » zplus/dokk.git
ID: 6ccd035a390c6618989edad9f797baede54bfb98
36 lines — 783B — View raw


SHELL = /bin/bash

REPOSITORY = https://github.com/readthedocs/readthedocs.org.git

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

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

repository:
	git clone ${REPOSITORY} repository

9.16.4 10.11.0 10.12.2 10.26.0: check_env_vars venv-3.10 repository
	source venv/bin/activate
	cd repository
	git checkout tags/$@
	pip install -r requirements/docs.txt
	cd docs
	mkdir --parents "${OUTPUT_PATH}"
	mkdir --parents "${OUTPUT_PATH}-dev"
	make clean
	make dirhtml
	PROJECT=dev make dirhtml
	cp --recursive _build/user/dirhtml "${OUTPUT_PATH}/$@"
	cp --recursive _build/dev/dirhtml "${OUTPUT_PATH}-dev/$@"

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