break-timer/makefile

21 lines
417 B
Makefile
Raw Permalink Normal View History

2023-07-23 17:34:22 +02:00
pwd = $(shell pwd)
name = $(notdir $(pwd))
symlink = ${HOME}/.local/bin/break-timer
venv = $(pwd)/.venv/bin/python
$(symlink): $(venv)
echo "#!/bin/sh\n$(venv) $(pwd)/src/main.py \"\$$@\"" > $(symlink)
chmod +x $(symlink)
$(venv): requirements.txt
python -m venv --prompt $(name) .venv
. .venv/bin/activate; \
pip install --upgrade pip; \
pip install -r requirements.txt
clean:
rm -r .venv
rm $(symlink)