-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 883 Bytes
/
Makefile
File metadata and controls
40 lines (30 loc) · 883 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
PREFIX ?= /usr/local
BINDIR ?= $(PREFIX)/bin
MANDIR ?= $(PREFIX)/share/man/man1
VERSION := $(shell grep '^version' Cargo.toml | head -1 | sed 's/.*"\(.*\)"/\1/')
.PHONY: build release install uninstall test lint clean setup cut-release
build:
cargo build
release:
cargo build --release
test:
cargo test
lint:
cargo clippy -- -W warnings
cargo fmt -- --check
install: release
install -d $(BINDIR)
install -m 755 target/release/yelo $(BINDIR)/yelo
@if [ "$$(uname)" = "Darwin" ]; then codesign --sign - --force $(BINDIR)/yelo 2>/dev/null || true; fi
@if [ -d $(MANDIR) ]; then install -m 644 doc/yelo.1 $(MANDIR)/yelo.1; fi
@echo "yelo $(VERSION) installed to $(BINDIR)/yelo"
uninstall:
rm -f $(BINDIR)/yelo
rm -f $(MANDIR)/yelo.1
clean:
cargo clean
setup:
git config core.hooksPath hooks
@echo "git hooks configured"
cut-release:
@scripts/release.sh $(BUMP)