forked from bolcom/libunftp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (39 loc) · 1.29 KB
/
Makefile
File metadata and controls
49 lines (39 loc) · 1.29 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
.PHONY: help
help: # Shows available `make` commands
@echo 'Available `make` commands:' >/dev/stderr
@echo >/dev/stderr
@awk -F'#' '/^[a-z][A-Za-z0-9]+/ {if (NF > 1) { sub(/:[^#]*/, ""); print $$1 "\t\t" $$2}}' Makefile
.PHONY: watch
watch: # Continuously runs `cargo check` and `cargo test` on file changes
cargo watch -x check -x "test --all-features" --clear
.PHONY: test
test: # Runs all tests
cargo test --all-features
.PHONY: fuzz
fuzz: # Runs fuzzing tests
cargo +nightly fuzz run parse_command
.PHONY: run
run: debug # Runs the `basic` example in verbose mode
RUST_LOG=INFO ./target/debug/examples/basic
.PHONY: docs
docs: # Creates the API docs and opens it in the browser
cargo doc --all-features --no-deps --open
.PHONY: debug
debug: # Creates a debug build
cargo build --example basic
.PHONY: examples
examples:
cargo build --examples
.PHONY: build
build: # Creates a release build
cargo build --release
.PHONY: pr-prep
pr-prep: # Runs checks to ensure you're ready for a pull request
cargo fmt --all -- --check
cargo clippy --all-features --all-targets -- -D warnings
cargo test --all-features --all-targets
cargo build --all-features --all-targets
cargo doc --all-features --no-deps
.PHONY: publish
publish: # Publishes the lib to crates.io
cargo publish --all-features --verbose