From 6f00ba06599f665c0693ca95e41a90bd3fb3e02a Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Mon, 15 Oct 2018 07:47:56 -0600 Subject: [PATCH] rust: fix (again) out of tree builds As the generated Cargo.toml is shipped as part of a release tarball, build from the source directory but set the cargo CARGO_TARGET_DIR to the build directory. --- rust/Makefile.am | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust/Makefile.am b/rust/Makefile.am index 5a1814027f..f73a10b7e3 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -32,12 +32,12 @@ endif all-local: if HAVE_PYTHON cd $(top_srcdir)/rust && $(HAVE_PYTHON) ./gen-c-headers.py - CARGO_HOME=$(CARGO_HOME) $(CARGO) build $(RELEASE) $(FROZEN) \ - --features "$(RUST_FEATURES)" -else - CARGO_HOME=$(CARGO_HOME) $(CARGO) build $(RELEASE) $(FROZEN) \ - --features "$(RUST_FEATURES)" endif + cd $(top_srcdir)/rust && \ + CARGO_HOME=$(CARGO_HOME) \ + CARGO_TARGET_DIR=$(abs_top_builddir)/rust/target \ + $(CARGO) build $(RELEASE) $(FROZEN) \ + --features "$(RUST_FEATURES)" clean-local: -rm -rf target -- 2.47.2