-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 782 Bytes
/
Makefile
File metadata and controls
40 lines (32 loc) · 782 Bytes
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
36
37
38
39
40
SYSPATH = /usr/local/bin
LOCALPATH = $(HOME)/git-project/bin
EXE = git-project
.PHONY: all help install uninstall tests reinstall
all: help
help:
@echo 'Usage: make COMMAND'
@echo
@echo 'Commands:'
@echo ' help: Display this message'
@echo ' install: Install git-project'
@echo ' uninstall: Uninstall git-project'
@echo ' tests: Run automated tests'
@echo
install:
@if touch $(SYSPATH)/$(EXE) 2>/dev/null; then \
cp $(EXE) $(SYSPATH)/; \
chmod +x $(SYSPATH)/$(EXE); \
else \
mkdir -p $(LOCALPATH); \
cp $(EXE) $(LOCALPATH)/; \
chmod +x $(LOCALPATH)/$(EXE); \
fi
uninstall:
@if touch $(SYSPATH)/$(EXE); then \
rm $(SYSPATH)/$(EXE); \
else \
rm $(LOCALPATH)/$(EXE); \
fi
reinstall: uninstall install
tests:
nosetests