Skip to content

Commit

Permalink
Inlcudes prod and dev commands in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissy93 committed May 28, 2023
1 parent 639ffae commit c2b7c9e
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions Makefile
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

0 comments on commit c2b7c9e

Please sign in to comment.