-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
28 lines (21 loc) · 767 Bytes
/
Makefile
File metadata and controls
28 lines (21 loc) · 767 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
DESTDIR := dist
all: release
release: target/release/backy-extract target/release/backy-fuse
target/release/backy-%: Cargo.toml src/*.rs src/*/*.rs
cargo build --release --features fuse_driver
VERSION := $(shell cargo read-manifest | jq .version -r)
PV = backy-extract-$(VERSION)
dist: release
install -D target/release/backy-extract -t tmp/$(PV)/bin
install -D target/release/backy-fuse -t tmp/$(PV)/bin
install -D -m 0644 README.md ChangeLog -t tmp/$(PV)/share/doc
install -d tmp/$(PV)/share/man/man1 dist
cd man && for f in *.1.rst; do \
rst2man $$f | sed s"/@version@/$(VERSION)/" > ../tmp/$(PV)/share/man/man1/$${f%%.rst}; \
done
tar czf dist/$(PV).tar.gz -C tmp $(PV)
rm -r tmp
clean:
cargo clean
rm -rf tmp dist
.PHONY: release dist clean