8dd5583ae9
We have fully transitioned to cxx-rs! This drops a lot of now dead code; only one binding system to think about generating source code. For example, a notable advantage of cxx-rs is it doesn't scan the whole source code, so running `make` doesn't spew errors from cbindgen not understanding bits.
22 lines
725 B
Makefile
22 lines
725 B
Makefile
# This is duplicated with LIBRPMOSTREE_RUST_SRCS because this
|
|
# Makefile needs to be independent
|
|
binding_rust_sources = $(shell find rust/src/ -name '*.rs') Cargo.toml Cargo.lock
|
|
|
|
rust/cxx.h: Makefile.bindings
|
|
cxxbridge --header >$@
|
|
|
|
rpmostree-cxxrs.h: $(binding_rust_sources)
|
|
$(AM_V_GEN) if cxxbridge rust/src/lib.rs --header > $@.tmp; then \
|
|
if test -f $@ && cmp $@.tmp $@ 2>/dev/null; then rm -f $@.tmp; else \
|
|
mv $@.tmp $@; \
|
|
fi; \
|
|
else \
|
|
echo cxxbridge failed; exit 1; \
|
|
fi
|
|
rpmostree-cxxrs.cxx: $(binding_rust_sources) rpmostree-cxxrs.h
|
|
$(AM_V_GEN) cxxbridge --include rpmostree-cxxrs.h rust/src/lib.rs > $@
|
|
|
|
# Invoked in CI
|
|
bindings: rpmostree-cxxrs.h rpmostree-cxxrs.cxx rust/cxx.h
|
|
.PHONY: bindings
|