-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (23 loc) · 892 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
include Makefile.config
.PHONY: all
all: etc/supervisord.conf links
bin:
mkdir -p bin
etc:
mkdir -p etc
var/log:
mkdir -p var/log
var/run:
mkdir -p var/run
.venv/bin/pip3:
@echo "Creating a virtualenv using $$(which python${PYTHON_VERSION})"
$$(which python${PYTHON_VERSION}) -m venv .venv
.venv/bin/supervisord: .venv/bin/pip3 requirements.txt var/log var/run
./.venv/bin/pip3 install -IUr requirements.txt
etc/supervisord.conf: etc .venv/bin/pip3 scripts/generate_supervisord_conf.py
./.venv/bin/python ./scripts/generate_supervisord_conf.py ${SUPERVISORD_PORT} ${SUPERVISORD_PASSWORD}
bin/supervisord: bin var/log var/run .venv/bin/supervisord
.PHONY: links
links: .venv/bin/supervisord bin
@if [ ! -L bin/supervisord ]; then ln -s ../.venv/bin/supervisord bin/supervisord; fi
@if [ ! -L bin/supervisorctl ]; then ln -s ../.venv/bin/supervisorctl bin/supervisorctl; fi