-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
42 lines (31 loc) · 737 Bytes
/
Makefile
File metadata and controls
42 lines (31 loc) · 737 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
41
42
default: release
debug:
cargo build --debug
release:
cargo build --release
test:
cargo test
VERSION = $(shell grep version Cargo.toml | awk '{ print $$3 }' | tr -d '"')
OWNER ?= root
GROUP ?= root
distribution: srcrr-$(VERSION).tgz
srcrr-$(VERSION).tgz: target/release/srcrr srcrr.bash LICENSE
rm -rf work
mkdir -p work/bin
mkdir -p work/share/srcrr
cp target/release/srcrr work/bin/
cp srcrr.bash work/share/srcrr/
cp LICENSE work/share/srcrr/
cd work && tar \
--owner $(OWNER) \
--group $(GROUP) \
-czf ../srcrr-$(VERSION).tgz *
rm -r work
DESTDIR ?= /usr/local
install: distribution
tar xzvf srcrr-$(VERSION).tgz -C $(DESTDIR)
clean:
rm -rf work
rm -f srcrr-$(VERSION).tgz
clean-all: clean
cargo clean