]>
Commit | Line | Data |
---|---|---|
35a60f76 WB |
1 | # Shortcut for common operations: |
2 | ||
77dc52c0 WB |
3 | CRATES = \ |
4 | proxmox \ | |
5 | proxmox-api-macro \ | |
e1f0eb4a | 6 | proxmox-async \ |
7db0a3c6 | 7 | proxmox-borrow \ |
77dc52c0 | 8 | proxmox-http \ |
01a8b6f1 | 9 | proxmox-io \ |
91f59f9f | 10 | proxmox-lang \ |
41f3fdfe WB |
11 | proxmox-router \ |
12 | proxmox-schema \ | |
9828acd2 | 13 | proxmox-shared-memory \ |
f35dbbd6 | 14 | proxmox-section-config \ |
77dc52c0 | 15 | proxmox-sortable-macro \ |
840154f6 | 16 | proxmox-sys \ |
bd67ccc1 | 17 | proxmox-tfa \ |
9b6fe4ac | 18 | proxmox-time \ |
bd67ccc1 | 19 | proxmox-uuid |
a94de245 | 20 | |
35a60f76 WB |
21 | # By default we just run checks: |
22 | .PHONY: all | |
23 | all: check | |
24 | ||
a94de245 FG |
25 | .PHONY: deb |
26 | deb: $(foreach c,$(CRATES), $c-deb) | |
27 | echo $(foreach c,$(CRATES), $c-deb) | |
28 | lintian build/*.deb | |
29 | ||
8e62cf06 FG |
30 | .PHONY: autopkgtest |
31 | autopkgtest: $(foreach c,$(CRATES), $c-autopkgtest) | |
32 | ||
93cf522d | 33 | .PHONY: dinstall |
3312a7ad WB |
34 | dinstall: |
35 | $(MAKE) clean | |
36 | $(MAKE) deb | |
436bf05e | 37 | sudo -k dpkg -i build/librust-*.deb |
93cf522d | 38 | |
a94de245 FG |
39 | %-deb: |
40 | ./build.sh $* | |
41 | touch $@ | |
42 | ||
8e62cf06 FG |
43 | %-autopkgtest: |
44 | autopkgtest build/$* build/*.deb -- null | |
45 | touch $@ | |
46 | ||
35a60f76 WB |
47 | .PHONY: check |
48 | check: | |
49 | cargo test | |
50 | ||
80343b11 WB |
51 | # Run the api-test server, serving the api-test/www/ subdir as 'www' dir over |
52 | # http: | |
53 | .PHONY: apitest | |
54 | apitest: | |
55 | cargo run -p api-test -- api-test/www/ | |
56 | ||
35a60f76 WB |
57 | # Prints a diff between the current code and the one rustfmt would produce |
58 | .PHONY: fmt | |
35a60f76 | 59 | fmt: |
d84f563d | 60 | cargo +nightly fmt -- --check |
35a60f76 WB |
61 | |
62 | # Doc without dependencies | |
63 | .PHONY: doc | |
64 | doc: | |
65 | cargo doc --no-deps | |
66 | ||
67 | .PHONY: clean | |
68 | clean: | |
69 | cargo clean | |
8e62cf06 | 70 | rm -rf build *-deb *-autopkgtest |
35a60f76 WB |
71 | |
72 | .PHONY: update | |
73 | update: | |
74 | cargo update | |
0e9eb37e FG |
75 | |
76 | %-upload: %-deb | |
77 | cd build; \ | |
78 | dcmd --deb rust-$*_*.changes \ | |
79 | | grep -v '.changes$$' \ | |
89d14b47 | 80 | | tar -cf "$@.tar" -T-; \ |
89d14b47 | 81 | cat "$@.tar" | ssh -X repoman@repo.proxmox.com upload --product devel --dist bullseye |