-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Inlcudes prod and dev commands in Makefile
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# The location of cargo bin (e.g. /usr/bin/cargo) | ||
CARGO_BIN = cargo | ||
# Any options for cargo | ||
CARGO_OPTS = | ||
# The full command to run cargo | ||
CARGO = $(CARGO_BIN) $(CARGO_OPTS) | ||
|
||
# Main make command - build, test and run the app | ||
all: clean build test doc run | ||
|
||
# Run the program, will first comile if needed | ||
run: build | ||
$(CARGO) run | ||
|
||
# Compile the source and dependencies | ||
build: | ||
$(CARGO) build --all-features | ||
|
||
# Run the unit and rustdoc tests | ||
test: build | ||
$(CARGO) test --all-features | ||
|
||
# Execute benchmkark tests | ||
bench: build | ||
$(CARGO) bench | ||
|
||
# Generate documentation from rustdoc | ||
doc: | ||
$(CARGO) doc --no-deps --all-features | ||
|
||
# Check the source for compilation errors | ||
check: | ||
$(CARGO) check --all-features | ||
|
||
# Format all bin + lib files | ||
fmt: | ||
$(CARGO) fmt -- --check | ||
|
||
# Check for common mistakes, and improvments | ||
clippy: | ||
$(CARGO) clippy -- -D warnings | ||
|
||
# Remove the target directory and compiled files | ||
clean: | ||
$(CARGO) clean | ||
|
||
.PHONY: all run build clean check test bench doc fmt clippy |