]> git.proxmox.com Git - proxmox.git/blame_incremental - Makefile
bump proxmox-schema to 3.0.1-1
[proxmox.git] / Makefile
... / ...
CommitLineData
1# Shortcut for common operations:
2
3CRATES != /usr/bin/cargo metadata --no-deps --format-version=1 | jq -r .workspace_members'[]' | awk '{ print $$1 }'
4
5# By default we just run checks:
6.PHONY: all
7all: check
8
9.PHONY: deb
10deb: $(foreach c,$(CRATES), $c-deb)
11 echo $(foreach c,$(CRATES), $c-deb)
12 lintian build/*.deb
13
14.PHONY: dsc
15dsc: $(foreach c,$(CRATES), $c-dsc)
16 echo $(foreach c,$(CRATES), $c-dsc)
17 lintian build/*.dsc
18
19.PHONY: autopkgtest
20autopkgtest: $(foreach c,$(CRATES), $c-autopkgtest)
21
22.PHONY: dinstall
23dinstall:
24 $(MAKE) clean
25 $(MAKE) deb
26 sudo -k dpkg -i build/librust-*.deb
27
28%-deb:
29 ./build.sh $*
30 touch $@
31
32%-dsc:
33 BUILDCMD='dpkg-buildpackage -S -us -uc -d' ./build.sh $*
34 touch $@
35
36%-autopkgtest:
37 autopkgtest build/$* build/*.deb -- null
38 touch $@
39
40.PHONY: check
41check:
42 cargo test
43
44# Run the api-test server, serving the api-test/www/ subdir as 'www' dir over
45# http:
46.PHONY: apitest
47apitest:
48 cargo run -p api-test -- api-test/www/
49
50# Prints a diff between the current code and the one rustfmt would produce
51.PHONY: fmt
52fmt:
53 cargo +nightly fmt -- --check
54
55# Doc without dependencies
56.PHONY: doc
57doc:
58 cargo doc --no-deps
59
60.PHONY: clean
61clean:
62 cargo clean
63 rm -rf build/
64 rm -f -- *-deb *-dsc *-autopkgtest *.build *.buildinfo *.changes
65
66.PHONY: update
67update:
68 cargo update
69
70%-upload: %-deb
71 cd build; \
72 dcmd --deb rust-$*_*.changes \
73 | grep -v '.changes$$' \
74 | tar -cf "$@.tar" -T-; \
75 cat "$@.tar" | ssh -X repoman@repo.proxmox.com upload --product devel --dist bookworm