-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (34 loc) · 918 Bytes
/
Copy pathMakefile
File metadata and controls
44 lines (34 loc) · 918 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
43
.PHONY: help install uninstall i u
PREFIX ?= /usr/local
BINDIR = $(PREFIX)/bin
APP_NAME = git-purge
help:
@echo "Available commands:"
@echo ""
@echo " make build - Builds git-purge app"
@echo " make check - performs test, code and format checks"
@echo " make install - Install git-purge to $(BINDIR)"
@echo " make uninstall - Remove git-purge from $(BINDIR)"
@echo " make c - alias for check command"
@echo " make i - alias for install command"
@echo " make u - alias for uninstall command"
@echo ""
build:
@cargo build --release
check:
cargo test
cargo check
cargo clippy -- -D warnings
cargo fmt -- --check
c: check
install:
@$(MAKE) build
@mkdir -p $(BINDIR)
@cp target/release/$(APP_NAME) $(BINDIR)
@echo "✅ Done!"
i: install
uninstall:
@echo "🗑️ Removing $(APP_NAME) from $(BINDIR)..."
@rm -f $(BINDIR)/$(APP_NAME)
@echo "✅ Uninstalled successfully!"
u: uninstall