]> git.proxmox.com Git - proxmox.git/blobdiff - Makefile
time: clippy fixes
[proxmox.git] / Makefile
index 2c1bd5374b3ca82a4dc418d78a0df1854bbce5f4..8c72c655b14fb00844478bfa3db45717bd6f37e0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,23 @@
 # Shortcut for common operations:
 
-CRATES=proxmox proxmox-api proxmox-api-macro proxmox-sortable-macro proxmox-sys proxmox-tools
+CRATES = \
+        proxmox-api-macro \
+        proxmox-async \
+        proxmox-borrow \
+        proxmox-compression \
+        proxmox-http \
+        proxmox-io \
+        proxmox-lang \
+        proxmox-router \
+        proxmox-schema \
+        proxmox-serde \
+        proxmox-shared-memory \
+        proxmox-section-config \
+        proxmox-sortable-macro \
+        proxmox-sys \
+        proxmox-tfa \
+        proxmox-time \
+        proxmox-uuid
 
 # By default we just run checks:
 .PHONY: all
@@ -11,23 +28,25 @@ deb: $(foreach c,$(CRATES), $c-deb)
        echo $(foreach c,$(CRATES), $c-deb)
        lintian build/*.deb
 
+.PHONY: autopkgtest
+autopkgtest: $(foreach c,$(CRATES), $c-autopkgtest)
+
 .PHONY: dinstall
 dinstall:
-       $(MAKE) proxmox-tools-deb proxmox-sortable-macro-deb
-       sudo dpkg -i build/librust-*.deb
-       $(MAKE) proxmox-api-macro-deb proxmox-sys-deb
-       sudo dpkg -i build/librust-*.deb
-       $(MAKE) proxmox-deb
-       sudo dpkg -i build/librust-*.deb
-       sudo -k
+       $(MAKE) clean
+       $(MAKE) deb
+       sudo -k dpkg -i build/librust-*.deb
 
 %-deb:
        ./build.sh $*
        touch $@
 
+%-autopkgtest:
+       autopkgtest build/$* build/*.deb -- null
+       touch $@
+
 .PHONY: check
 check:
-       cargo +nightly fmt -- --check
        cargo test
 
 # Run the api-test server, serving the api-test/www/ subdir as 'www' dir over
@@ -38,13 +57,8 @@ apitest:
 
 # Prints a diff between the current code and the one rustfmt would produce
 .PHONY: fmt
-checkfmt:
-       cargo fmt --all -- --check
-
-# Reformat the code (ppply the output of `make checkfmt`)
-.PHONY: fmt
 fmt:
-       cargo fmt --all
+       cargo +nightly fmt -- --check
 
 # Doc without dependencies
 .PHONY: doc
@@ -54,8 +68,15 @@ doc:
 .PHONY: clean
 clean:
        cargo clean
-       rm -rf build *-deb
+       rm -rf build *-deb *-autopkgtest
 
 .PHONY: update
 update:
        cargo update
+
+%-upload: %-deb
+       cd build; \
+           dcmd --deb rust-$*_*.changes \
+           | grep -v '.changes$$' \
+           | tar -cf "$@.tar" -T-; \
+           cat "$@.tar" | ssh -X repoman@repo.proxmox.com upload --product devel --dist bullseye