-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmakefile
35 lines (26 loc) · 949 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
34
35
SHELL:=/bin/bash
ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
.PHONY: all fresh dependencies install fulluninstall uninstall removedeps
all: dependencies
fresh: fulluninstall dependencies
fulluninstall: uninstall cleancode
install:
# Create link in /usr/local/bin to screeps stats program.
ln -s -f $(ROOT_DIR)/bin/screepsconsole.sh /usr/local/bin/screepsconsole
dependencies:
if [ ! -d $(ROOT_DIR)/env ]; then virtualenv $(ROOT_DIR)/env; fi
source $(ROOT_DIR)/env/bin/activate; yes w | pip install -r $(ROOT_DIR)/requirements.txt
uninstall:
# Remove screepsstats link in /user/local/bin
if [ -L /usr/local/bin/screepsconsole.sh ]; then \
rm /usr/local/bin/screepsconsole; \
fi;
cleancode:
# Remove existing environment
if [ -d $(ROOT_DIR)/env ]; then \
rm -rf $(ROOT_DIR)/env; \
fi;
# Remove compiled python files
if [ -d $(ROOT_DIR)/screep_etl ]; then \
rm -f $(ROOT_DIR)/screep_etl/*.pyc; \
fi;