From: Jason Ish Date: Wed, 7 Jun 2017 19:25:16 +0000 (-0600) Subject: rust: don't fail distcheck if cargo-vendor not found X-Git-Tag: suricata-4.0.0-rc1~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fafa75035f213b9a1d946f9d4a3b101639c9d7d3;p=thirdparty%2Fsuricata.git rust: don't fail distcheck if cargo-vendor not found 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. --- diff --git a/rust/Makefile.am b/rust/Makefile.am index d4bbd15a68..09cfc2554f 100644 --- a/rust/Makefile.am +++ b/rust/Makefile.am @@ -1,12 +1,14 @@ 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 @@ -17,15 +19,6 @@ if !DEBUG 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 @@ -56,15 +49,25 @@ check: 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