-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
44 lines (38 loc) · 1.17 KB
/
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
36
37
38
39
40
41
42
43
44
# TODO: manpages?
# other binaries
all: build
.PHONY: build
build:
$(shell [ "$EUID" = "0" ] && echo "build can not be run as root" && exit 1)
@echo ":: Rebuilding in release mode..."
@cargo build --release
.PHONY: install
install:
@echo ":: Installing binaries..."
@mkdir -p /usr/local/bin
@cp -f target/release/penrose /usr/local/bin
@chmod 755 /usr/local/bin/penrose
@cp -R bin/. /usr/local/bin
@ls bin | xargs -I {} chmod 755 /usr/local/bin/{}
@echo ":: Installing utility scripts..."
@cp -r scripts /usr/local
@ls scripts | grep -Ev 'png|jpeg' | xargs -I {} chmod 755 /usr/local/scripts/{}
@echo ":: Done"
.PHONY: uninstall
uninstall:
@echo ":: Removing binaries..."
@ls bin | xargs -I {} rm -f /usr/local/bin/{}
@rm -f /usr/local/bin/penrose
@echo ":: Removing scripts..."
@ls scripts | xargs -I {} rm -f /usr/local/scripts/{}
@echo ":: Done"
.PHONY: build-debug
build-debug:
$(shell [ "$EUID" = "0" ] && echo "build can not be run as root" && exit 1)
@echo ":: Rebuilding in debug mode..."
@cargo build
.PHONY: install-debug
install-debug:
@echo ":: Installing binary..."
@cp -f target/debug/penrose /usr/local/bin
@chmod 755 /usr/local/bin/penrose