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