Tuesday 13 December 2016
Rust and Automake - Part 2
By hub, Tuesday 13 December 2016 at 22:07 :: Rust
I already talked about Rust and Automake. This is a follow-up.
One of the caveat of the previous implementation is that it doesn't pass make distcheck
as it doesn't work when srcdir != builddir
.
The main problem is that we need to tell cargo
to build in a different directory. Fortunately Cargo PR #1657 has taken care of this. So all we need is a carefully crafted CARGO_TARGET_DIR
environment variable to set before calling cargo. You can substitute abs_top_builddir
for the top build directory.
But let's show the patch. Nothing complicated.