SHELL = /bin/bash REPOSITORY = https://github.com/cuthbertLab/music21.git check_env_vars: ifdef OUTPUT_PATH OUTPUT_PATH := ${OUTPUT_PATH}/music21 else $(error OUTPUT_PATH is undefined) endif venv: python3 -m venv venv repository: git clone ${REPOSITORY} repository # For this to build the python notebooks into the documentation, it requires pandoc. v8.3.0 v9.1.0: check_env_vars venv repository source venv/bin/activate cd repository git checkout tags/$@ # --editable is required because it will add the current path to Python's modules # path instead of installing the files in the pip virtual environment. # The music21 build system is weird, and needs this path as root for looking # up some files. Installing in the virtual env. will not be able to find the files pip install --editable . pip install -r requirements_dev.txt cd documentation python3 make.py clean python3 make.py mkdir --parents "${OUTPUT_PATH}" cp --recursive build/html "${OUTPUT_PATH}/$@" .ONESHELL: .SUFFIXES: .PHONY: .DELETE_ON_ERROR: