forked from fossasia/pslab-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 1.26 KB
/
Makefile
File metadata and controls
35 lines (29 loc) · 1.26 KB
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
DESTDIR =
# Find library installation path
INSTALL_PATH = $(patsubst Location:,,$(shell python3 -m pip show PSL | grep Location))
INSTALL_PATH_LEN = $(shell echo $(INSTALL_PATH) | wc -c)
all:
python3 setup.py build
fullcleanup: verifyFiles
# Removes every PSL instance in system. Be careful and check if the following list got all files inside a python folder or related to PSLab
find /usr/* -name "PSL*" -type d | xargs rm -rf
find /usr/* -name "pslab*" -type d | xargs rm -rf
find /opt/* -name "pslab-*" -type d | xargs rm -rf
find /usr/* -name "Experiments" -type f | xargs rm -rf
@echo "All selected files are deleted.."
verifyFiles:
@find /usr/* -name "PSL*" -type d
@find /usr/* -name "pslab*" -type d
@find /opt/* -name "pslab-*" -type d
@find /usr/* -name "Experiments" -type f
@echo -n "Confirm if you want to remove all these files.. [Y/N] " && read ans && [ $${ans:-N} = Y ]
clean:
# Remove build files
@rm -rf docs/_*
@rm -rf PSL.egg-info build
@find . -name "*~" -o -name "*.pyc" -o -name "__pycache__" | xargs rm -rf
if [ ${INSTALL_PATH_LEN} -gt 2 ]; then sudo rm -rf $(INSTALL_PATH)/PSL $(INSTALL_PATH)/PSL-1* ; fi
install:
python3 setup.py install
mkdir -p $(DESTDIR)/lib/udev/rules.d
install -m 644 99-pslab.rules $(DESTDIR)/lib/udev/rules.d/99-pslab