CARGO := cargo
PREFIX ?= /usr/local
COMPLETION_FEATURE := --features completion
.PHONY: build build-all release release-all check test bench clean install install-all help
build:
$(CARGO) build
build-all:
$(CARGO) build $(COMPLETION_FEATURE)
release:
$(CARGO) build --release
release-all:
$(CARGO) build --release $(COMPLETION_FEATURE)
check:
$(CARGO) check $(COMPLETION_FEATURE)
test:
$(CARGO) test
bench:
$(CARGO) bench
clean:
$(CARGO) clean
install: release
install -d "$(PREFIX)/bin"
install -m 755 target/release/stash "$(PREFIX)/bin/stash"
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:
@grep -E '^##' Makefile | sed 's/^## //'