build-sys: With external cbindgen, drop Rust lib dependency

Perhaps an unexpected side benefit of slow compilation processes
is that one has an opportunity to reflect and ponder.

I realized during exactly such a moment that since we moved
`cbindgen` out of our library build, there's no need to wait
for the library to be built before we can start building the C
code.

This is a notable local quality-of-life development improvement.

Closes: #1665
Approved by: jlebon
This commit is contained in:
Colin Walters 2018-11-05 18:04:45 +00:00 committed by Atomic Bot
parent 55696824df
commit bd4d0d8e0a

View File

@ -115,10 +115,10 @@ EXTRA_DIST += $(LIBRPMOSTREE_RUST_SRCS) rust/Cargo.lock
# Generate bindings from Rust to C
if !HAVE_PREBUILT_CBINDGEN
if HAVE_EXTERNAL_CBINDGEN
rpmostree-rust.h: $(librpmostree_rust_path)
rpmostree-rust.h:
$(AM_V_GEN) cbindgen -c rust/cbindgen.toml -o $@ $(top_srcdir)/rust
else
rpmostree-rust.h: $(librpmostree_rust_path) rpmostree-bindgen
rpmostree-rust.h: rpmostree-bindgen
$(AM_V_GEN) ./rpmostree-bindgen $(top_srcdir)/rust
endif
BUILT_SOURCES += rpmostree-rust.h