-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (41 loc) · 1.35 KB
/
Makefile
File metadata and controls
54 lines (41 loc) · 1.35 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CARGO := cargo
PREFIX ?= /usr/local
# Feature flag that enables stash-completion binary
COMPLETION_FEATURE := --features completion
.PHONY: build build-all release release-all check test bench clean install install-all help
## build Build stash (dev, no completion)
build:
$(CARGO) build
## build-all Build stash + stash-completion (dev)
build-all:
$(CARGO) build $(COMPLETION_FEATURE)
## release Build stash (release, no completion)
release:
$(CARGO) build --release
## release-all Build stash + stash-completion (release)
release-all:
$(CARGO) build --release $(COMPLETION_FEATURE)
## check Run cargo check (fast syntax/type check)
check:
$(CARGO) check $(COMPLETION_FEATURE)
## test Run all tests
test:
$(CARGO) test
## bench Run benchmarks
bench:
$(CARGO) bench
## clean Remove build artifacts
clean:
$(CARGO) clean
## install Install stash to PREFIX/bin (default: /usr/local/bin)
install: release
install -d "$(PREFIX)/bin"
install -m 755 target/release/stash "$(PREFIX)/bin/stash"
## install-all Install stash + stash-completion to PREFIX/bin
install-all: release-all
install -d "$(PREFIX)/bin"
install -m 755 target/release/stash "$(PREFIX)/bin/stash"
install -m 755 target/release/stash-completion "$(PREFIX)/bin/stash-completion"
## help Show this help
help:
@grep -E '^##' Makefile | sed 's/^## //'