Allow distcheck to pass if cargo vendor is not found by not
failing out. It is not required to successfully build a dist
tarball, the Rust sources will just not be vendored in.
Also don't fail out make dist if Python is not installed. A build
will still be successful is Python is available on the end
build system.
EXTRA_DIST = Cargo.toml \
src \
.cargo/config.in \
- gen-c-headers.py \
- gen/c-headers
+ gen-c-headers.py
if HAVE_RUST
-EXTRA_DIST += Cargo.lock \
- vendor
+
+EXTRA_DIST += Cargo.lock
+
+if HAVE_CARGO_VENDOR
+EXTRA_DIST += vendor
endif
if HAVE_RUST_VENDOR
RELEASE = --release
endif
-gen/c-headers:
-if HAVE_PYTHON
- cd $(top_srcdir)/rust && python ./gen-c-headers.py
-else
- @echo "python not available, will not generate headers"
-endif
-
-if HAVE_RUST
-
FEATURES =
if HAVE_LUA
Cargo.lock: Cargo.toml
cargo update
-else
-all-local clean-local check:
-endif
if HAVE_CARGO_VENDOR
vendor:
cargo vendor > /dev/null
else
vendor:
- @echo "error: cargo vendor not installed"
- exit 1
+endif
+
+else # HAVE_RUST
+
+all-local clean-local check vendor:
+
+endif # HAVE_RUST
+
+# Can only include the headers if we have Python to generate them.
+if HAVE_PYTHON
+EXTRA_DIST += gen/c-headers
+gen/c-headers:
+ cd $(top_srcdir)/rust && python ./gen-c-headers.py
+else
+gen/c-headers:
endif