-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathJustfile
35 lines (26 loc) · 1000 Bytes
/
Justfile
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
default_prefix := "/usr/local"
default_manpage_path := "share/man/man1/"
default_manpage := "maman.1"
all: build test
@build:
cargo build
@test:
cargo test --all -- --quiet
@bench:
cargo bench
@docs: build
cargo doc --no-deps
@format:
cargo fmt --all -- --check
@lint:
cargo clippy -- -D warnings
@install:
cargo build --release
find doc/ -type f -exec asciidoctor -b manpage -D man/man1 {} \;
install -dm755 {{env_var_or_default("PREFIX", default_prefix)}}/bin/
install -dm755 {{env_var_or_default("PREFIX", default_prefix)}}/{{default_manpage_path}}
install -sm755 target/release/maman {{env_var_or_default("PREFIX", default_prefix)}}/bin/
install -m644 man/man1/{{default_manpage}} {{env_var_or_default("PREFIX", default_prefix)}}/{{default_manpage_path}}
@uninstall:
rm -f {{env_var_or_default("PREFIX", default_prefix)}}/bin/maman
rm -f {{env_var_or_default("PREFIX", default_prefix)}}/{{default_manpage_path}}{{default_manpage}}