Last active
March 24, 2019 15:39
-
-
Save mzabaluev/502307bb41ba6268594f to your computer and use it in GitHub Desktop.
Drop-in makefile for Cargo projects
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
CARGO = cargo | |
CARGO_OPTS = | |
all: | |
$(MAKE) build | |
$(MAKE) doc | |
build: | |
$(CARGO) $(CARGO_OPTS) build | |
clean: | |
$(CARGO) $(CARGO_OPTS) clean | |
check: | |
$(MAKE) build | |
$(MAKE) test | |
test: | |
$(CARGO) $(CARGO_OPTS) test | |
bench: | |
$(CARGO) $(CARGO_OPTS) bench | |
doc: | |
$(CARGO) $(CARGO_OPTS) doc | |
.PHONY: all build clean check test bench doc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe @NichtJens is correct,
cargo
obtains a lock to build a project, and so the parallelization will be lost. No harm done though, since they'll still execute, just out of order - andcargo
has proper dependency resolution so they'll end up actually building in the correct order on that end.