]>
Commit | Line | Data |
---|---|---|
35a60f76 WB |
1 | # Shortcut for common operations: |
2 | ||
a94de245 FG |
3 | CRATES=proxmox proxmox-api proxmox-api-macro proxmox-sortable-macro proxmox-sys proxmox-tools |
4 | ||
35a60f76 WB |
5 | # By default we just run checks: |
6 | .PHONY: all | |
7 | all: check | |
8 | ||
a94de245 FG |
9 | .PHONY: deb |
10 | deb: $(foreach c,$(CRATES), $c-deb) | |
11 | echo $(foreach c,$(CRATES), $c-deb) | |
12 | lintian build/*.deb | |
13 | ||
14 | %-deb: | |
15 | ./build.sh $* | |
16 | touch $@ | |
17 | ||
35a60f76 WB |
18 | .PHONY: check |
19 | check: | |
ac45b7ce | 20 | cargo fmt -- --check |
35a60f76 WB |
21 | cargo test |
22 | ||
80343b11 WB |
23 | # Run the api-test server, serving the api-test/www/ subdir as 'www' dir over |
24 | # http: | |
25 | .PHONY: apitest | |
26 | apitest: | |
27 | cargo run -p api-test -- api-test/www/ | |
28 | ||
35a60f76 WB |
29 | # Prints a diff between the current code and the one rustfmt would produce |
30 | .PHONY: fmt | |
31 | checkfmt: | |
32 | cargo fmt --all -- --check | |
33 | ||
34 | # Reformat the code (ppply the output of `make checkfmt`) | |
35 | .PHONY: fmt | |
36 | fmt: | |
37 | cargo fmt --all | |
38 | ||
39 | # Doc without dependencies | |
40 | .PHONY: doc | |
41 | doc: | |
42 | cargo doc --no-deps | |
43 | ||
44 | .PHONY: clean | |
45 | clean: | |
46 | cargo clean | |
a94de245 | 47 | rm -rf build *-deb |
35a60f76 WB |
48 | |
49 | .PHONY: update | |
50 | update: | |
51 | cargo update |