ID: 2e546838cfe6401d7d807882b94cbc27049645ac
46 lines
—
840B —
View raw
| ###################
# THIS DOESN'T WORK
# GIVES C++ ERRORS
###################
SHELL = /bin/bash
REPOSITORY = https://github.com/ampl/mp.git
check_env_vars:
ifdef OUTPUT_PATH
OUTPUT_PATH := ${OUTPUT_PATH}/amplmp
else
$(error OUTPUT_PATH is undefined)
endif
venv-3.11:
export PYENV_VERSION=3.11
python3 -m venv venv
repository:
git clone ${REPOSITORY} repository
# See /intro.html#building-the-documentation for instructions
2024-02-03-9774069e: check_env_vars venv-3.11 repository
# Extract commit hash
commit_hash=$@
commit_hash=$${commit_hash:11}
source venv/bin/activate
cd repository
git checkout $${commit_hash}
pip install -r doc/requirements.txt
mkdir build
cd build
cmake ..
make mp-doc
mkdir --parents "${OUTPUT_PATH}"
cp --recursive . "${OUTPUT_PATH}/$@"
.ONESHELL:
.SUFFIXES:
.PHONY:
.DELETE_ON_ERROR:
|