ID: ec7cdba8e7937b4b5ea41920ae8d8f8f3f4b19b3
38 lines
—
939B —
View raw
| SHELL = /bin/bash
REPOSITORY = https://github.com/mathjax/MathJax-docs.git
check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/mathjax
else
$(error OUTPUT_PATH is undefined)
endif
venv:
python3 -m venv venv
repository:
git clone ${REPOSITORY} repository
# This repository uses branches instead of tags
v3.2-latest: check_env_vars venv repository
mkdir --parents "${OUTPUT_PATH}"
source venv/bin/activate
cd repository
git switch $@
pip install sphinx sphinx-rtd-theme
sphinx-build -b dirhtml . "${OUTPUT_PATH}/$@"
v1.0 v1.1-latest v2.0-latest v2.1-latest v2.2-latest v2.3-latest v2.4-latest v2.5-latest v2.6-latest v2.7-latest v3.0-latest v3.1-latest: check_env_vars venv repository
mkdir --parents "${OUTPUT_PATH}"
source venv/bin/activate
cd repository
git switch $@
pip install "sphinx < 6" sphinx-rtd-theme
sphinx-build -b dirhtml . "${OUTPUT_PATH}/$@"
.ONESHELL:
.SUFFIXES:
.PHONY:
.DELETE_ON_ERROR:
|