home » zplus/dokk.git
ID: 9a322fb0bb89868454e4c8d879c7d327f804b757
35 lines — 668B — View raw


SHELL = /bin/bash

REPOSITORY = https://github.com/biothings/biothings_schema.py.git

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

venv:
	python3 -m venv venv

repository:
	git clone ${REPOSITORY} repository

2023-03-18-fad784fc: check_env_vars venv repository
	# Extract hash id
	commit_hash=$@
	commit_hash=$${commit_hash:11}

	source venv/bin/activate
	cd repository
	git checkout $${commit_hash}
	pip install sphinx
	cd docs
	make clean dirhtml
	mkdir --parents "${OUTPUT_PATH}"
	cp --recursive _build/dirhtml "${OUTPUT_PATH}/$@"

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