]>
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 | ||
93cf522d WB |
14 | .PHONY: dinstall |
15 | dinstall: | |
16 | $(MAKE) proxmox-tools-deb proxmox-sortable-macro-deb | |
17 | sudo dpkg -i build/librust-*.deb | |
18 | $(MAKE) proxmox-api-macro-deb proxmox-sys-deb | |
19 | sudo dpkg -i build/librust-*.deb | |
20 | $(MAKE) proxmox-deb | |
21 | sudo dpkg -i build/librust-*.deb | |
22 | sudo -k | |
23 | ||
a94de245 FG |
24 | %-deb: |
25 | ./build.sh $* | |
26 | touch $@ | |
27 | ||
35a60f76 WB |
28 | .PHONY: check |
29 | check: | |
b4a0e648 | 30 | cargo +nightly fmt -- --check |
35a60f76 WB |
31 | cargo test |
32 | ||
80343b11 WB |
33 | # Run the api-test server, serving the api-test/www/ subdir as 'www' dir over |
34 | # http: | |
35 | .PHONY: apitest | |
36 | apitest: | |
37 | cargo run -p api-test -- api-test/www/ | |
38 | ||
35a60f76 WB |
39 | # Prints a diff between the current code and the one rustfmt would produce |
40 | .PHONY: fmt | |
41 | checkfmt: | |
42 | cargo fmt --all -- --check | |
43 | ||
44 | # Reformat the code (ppply the output of `make checkfmt`) | |
45 | .PHONY: fmt | |
46 | fmt: | |
47 | cargo fmt --all | |
48 | ||
49 | # Doc without dependencies | |
50 | .PHONY: doc | |
51 | doc: | |
52 | cargo doc --no-deps | |
53 | ||
54 | .PHONY: clean | |
55 | clean: | |
56 | cargo clean | |
a94de245 | 57 | rm -rf build *-deb |
35a60f76 WB |
58 | |
59 | .PHONY: update | |
60 | update: | |
61 | cargo update |