TEMP: dynamically link against liblz4 for testing
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
2ae7d196b9
commit
dc04ce7fe5
@ -43,3 +43,6 @@ pam-sys = "0.5"
|
||||
pam = "0.7"
|
||||
lz4 = "1.23"
|
||||
xdg = "2.2"
|
||||
|
||||
[patch.crates-io]
|
||||
lz4-sys = { path = "lz4-rs/lz4-sys" }
|
||||
|
20
Makefile
20
Makefile
@ -46,10 +46,10 @@ all: cargo-build $(SUBDIRS)
|
||||
$(SUBDIRS):
|
||||
$(MAKE) -C $@
|
||||
|
||||
test:
|
||||
test: | dependencies
|
||||
cargo test $(CARGO_BUILD_ARGS)
|
||||
|
||||
doc:
|
||||
doc: | dependencies
|
||||
cargo doc --no-deps $(CARGO_BUILD_ARGS)
|
||||
|
||||
# always re-create this dir
|
||||
@ -93,7 +93,7 @@ dinstall: ${DEB}
|
||||
docs: cargo-build
|
||||
|
||||
.PHONY: cargo-build
|
||||
cargo-build:
|
||||
cargo-build: | dependencies
|
||||
cargo build $(CARGO_BUILD_ARGS)
|
||||
|
||||
$(COMPILED_BINS): cargo-build
|
||||
@ -110,3 +110,17 @@ install: $(COMPILED_BINS)
|
||||
install -m755 $(COMPILEDIR)/$(i) $(DESTDIR)$(LIBEXECDIR)/proxmox-backup/ ;)
|
||||
$(MAKE) -C www install
|
||||
$(MAKE) -C docs install
|
||||
|
||||
#
|
||||
# External dependency patching:
|
||||
#
|
||||
|
||||
dependencies: lz4-rs
|
||||
|
||||
# We want to dynamically link against the system's liblz4!
|
||||
# The lz4-sys crate provides some more helpers in addition to the 'extern "C"' block so we still
|
||||
# need to use its rust code directly in order for the `lz4` crate to be happy.
|
||||
lz4-rs:
|
||||
git clone https://github.com/bozaro/lz4-rs
|
||||
echo 'fn main() { println!("cargo:rustc-link-lib=lz4"); }' \
|
||||
>lz4-rs/lz4-sys/build.rs
|
||||
|
Loading…
Reference in New Issue
Block a user