]>
git.proxmox.com Git - proxmox-perl-rs.git/blob - Makefile
3 ifeq ($(BUILD_MODE
), release
)
4 CARGO_BUILD_ARGS
+= --release
10 ifeq ($(BUILD_TARGET
), pve
)
12 else ifeq ($(BUILD_TARGET
), pmg
)
23 echo system
>build
/rust-toolchain
24 cp
-a .
/Cargo.toml .
/build
25 cp
-a .
/common .
/build
26 cp
-a .
/pve-rs .
/build
27 cp
-a .
/pmg-rs .
/build
28 # Replace the symlinks with copies of the common code in pve/pmg:
29 cd build
; for i in pve pmg
; do \
30 rm .
/$$i-rs
/common
; \
31 mkdir .
/$$i-rs
/common
; \
32 cp
-R .
/common
/src .
/$$i-rs
/common
/src
; \
34 # So the common packages end up in ./build, rather than ./build/common
35 mv .
/build
/common
/pkg .
/build
/common-pkg
36 # Copy the workspace root into the sources
37 mkdir build
/pve-rs
/.workspace
38 cp
-t build
/pve-rs
/.workspace Cargo.toml
39 sed
-i
-e
'/\[package\]/a\workspace = ".workspace"' build
/pve-rs
/Cargo.toml
40 # Clear the member array and replace it with ".."
41 sed
-i
-e
'/^members = \[/,/^]$$/d' build
/pve-rs
/.workspace
/Cargo.toml
42 sed
-i
-e
'/^\[workspace\]/a\members = [ ".." ]' build
/pve-rs
/.workspace
/Cargo.toml
43 # Copy the cargo config
44 mkdir build
/pve-rs
/.cargo
45 cp
-t build
/pve-rs
/.cargo .cargo
/config