2019-06-18 18:49:40 +03:00
# Shortcut for common operations:
2021-10-01 11:58:45 +03:00
CRATES = \
proxmox-api-macro \
2021-11-19 18:03:09 +03:00
proxmox-async \
2021-10-01 16:31:32 +03:00
proxmox-borrow \
2022-02-21 13:39:16 +03:00
proxmox-compression \
2021-10-01 11:58:45 +03:00
proxmox-http \
2021-10-06 15:52:59 +03:00
proxmox-io \
2021-10-06 11:38:15 +03:00
proxmox-lang \
2021-10-07 10:36:06 +03:00
proxmox-router \
proxmox-schema \
2021-11-24 09:54:40 +03:00
proxmox-serde \
2021-11-11 12:26:28 +03:00
proxmox-shared-memory \
2021-10-07 14:39:10 +03:00
proxmox-section-config \
2021-10-01 11:58:45 +03:00
proxmox-sortable-macro \
2021-11-19 09:35:19 +03:00
proxmox-sys \
2021-10-01 16:07:07 +03:00
proxmox-tfa \
2021-10-04 12:25:56 +03:00
proxmox-time \
2021-10-01 16:07:07 +03:00
proxmox-uuid
2020-01-15 10:05:49 +03:00
2019-06-18 18:49:40 +03:00
# By default we just run checks:
.PHONY : all
all : check
2020-01-15 10:05:49 +03:00
.PHONY : deb
deb : $( foreach c ,$ ( CRATES ) , $ c -deb )
echo $( foreach c,$( CRATES) , $c -deb)
lintian build/*.deb
2021-01-14 16:23:45 +03:00
.PHONY : autopkgtest
autopkgtest : $( foreach c ,$ ( CRATES ) , $ c -autopkgtest )
2020-01-21 13:28:15 +03:00
.PHONY : dinstall
2020-01-21 14:30:13 +03:00
dinstall :
$( MAKE) clean
$( MAKE) deb
2020-01-21 13:56:56 +03:00
sudo -k dpkg -i build/librust-*.deb
2020-01-21 13:28:15 +03:00
2020-01-15 10:05:49 +03:00
%-deb :
./build.sh $*
touch $@
2021-01-14 16:23:45 +03:00
%-autopkgtest :
autopkgtest build/$* build/*.deb -- null
touch $@
2019-06-18 18:49:40 +03:00
.PHONY : check
check :
cargo test
2019-06-18 18:52:29 +03:00
# Run the api-test server, serving the api-test/www/ subdir as 'www' dir over
# http:
.PHONY : apitest
apitest :
cargo run -p api-test -- api-test/www/
2019-06-18 18:49:40 +03:00
# Prints a diff between the current code and the one rustfmt would produce
.PHONY : fmt
fmt :
2020-03-16 14:21:14 +03:00
cargo +nightly fmt -- --check
2019-06-18 18:49:40 +03:00
# Doc without dependencies
.PHONY : doc
doc :
cargo doc --no-deps
.PHONY : clean
clean :
cargo clean
2021-01-14 16:23:45 +03:00
rm -rf build *-deb *-autopkgtest
2019-06-18 18:49:40 +03:00
.PHONY : update
update :
cargo update
2020-03-03 13:50:28 +03:00
%-upload : %-deb
cd build; \
dcmd --deb rust-$* _*.changes \
| grep -v '.changes$$' \
2021-05-14 13:08:50 +03:00
| tar -cf " $@ .tar " -T-; \
cat " $@ .tar " | ssh -X repoman@repo.proxmox.com upload --product devel --dist bullseye