#! /usr/bin/make -f THIS := $(lastword $(MAKEFILE_LIST)) default: help PIP=https://solar-orbiter.physik.uni-kiel.de/pip/et/public ifeq ($(PIP),PyPI) PIPP=--proxy=http://www-cache.rz.uni-kiel.de:80 else PIPP=--index-url=$(PIP) endif VENV=../env install: rm -rf $(VENV)~ -mv $(VENV) $(VENV)~ python3 -m venv --system-site-packages --symlinks $(VENV) $(VENV)/bin/pip3 install $(PIPP) -r requirements.txt -[ -f requirements-et.txt ] && $(VENV)/bin/pip3 install $(PIPP) -r requirements-et.txt patch < bokeh.patch ../env/lib/python*/site-packages/bokeh/core/templates.py start: bash -c 'nohup $(VENV)/bin/python3 app.py >> ../plotter.log 2>&1 & echo $$! > .pid' stop: -cat .pid | xargs pgrep --parent >> .pids -cat .pid | xargs kill -cat .pids | xargs kill kill: -killall --verbose $(VENV)/bin/python3 status: cat .pid -cat .pid | xargs pgrep --list-full --parent -pgrep --list-full -f $(VENV)/bin/python3