[Libguestfs] [PATCH 11/11] Rust bindings: Incorporate bindings to build system

Hiroyuki Katsura hiroyuki.katsura.0513 at gmail.com
Thu Jun 27 10:31:06 UTC 2019


---
 configure.ac     |  2 ++
 rust/Makefile.am | 16 +++++++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index f9bdbe54b..b35b1ce0f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -431,6 +431,8 @@ AS_ECHO_N(["Vala bindings ....................... "])
 if test "x$ENABLE_VAPIGEN_TRUE" = "x"; then echo "yes"; else echo "no"; fi
 AS_ECHO_N(["bash completion ..................... "])
 if test "x$HAVE_BASH_COMPLETION_TRUE" = "x"; then echo "yes"; else echo "no"; fi
+AS_ECHO_N(["Rust bindings ....................... "])
+if test "x$HAVE_RUST_TRUE" = "x"; then echo "yes"; else echo "no"; fi
 echo
 echo "If any optional component is configured 'no' when you expected 'yes'"
 echo "then you should check the preceding messages."
diff --git a/rust/Makefile.am b/rust/Makefile.am
index e8bf27894..261cf4a5c 100644
--- a/rust/Makefile.am
+++ b/rust/Makefile.am
@@ -18,12 +18,26 @@
 include $(top_srcdir)/subdir-rules.mk
 
 generator_built = \
+	src/bin/bindtests.rs \
 	src/lib.rs
 
 EXTRA_DIST = \
-	$(generator_built)
+	.gitignore \
+	$(generator_built) \
+	tests/*.rs \
+	Cargo.toml \
+	Cargo.lock \
+	run-bindtests \
+	run-tests
 
 if HAVE_RUST
 
+all: src/lib.rs
+	$(top_builddir)/run $(CARGO) build --release
+
+TESTS = run-bindtests run-tests
+
+CLEANFILES += target/*~
+
 endif
 
-- 
2.20.1 (Apple Git-117)




More information about the Libguestfs mailing list