ID: 114f5aedaeb2e3982f93a4a23044b091f05137ec
36 lines
—
749B —
View raw
| SHELL = /bin/bash
REPOSITORY = https://github.com/biothings/mychem.info.git
check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/biothings-mychem.info
else
$(error OUTPUT_PATH is undefined)
endif
venv-2.7:
export PYENV_VERSION=2.7
pyenv virtualenv $$PYENV_VERSION venv
repository:
git clone ${REPOSITORY} repository
2023-11-14-8520433e: check_env_vars venv-2.7 repository
# Extract hash id
commit_hash=$@
commit_hash=$${commit_hash:11}
source ~/.pyenv/versions/venv/bin/activate
cd repository
git checkout $${commit_hash}
pip install sphinx sphinx_rtd_theme
cd docs
make clean dirhtml
mkdir --parents "${OUTPUT_PATH}"
cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"
.ONESHELL:
.SUFFIXES:
.PHONY:
.DELETE_ON_ERROR:
|