From 77d0d1d1a1968ed5bc2813778ac45d181c380ff7 Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Wed, 25 Sep 2024 16:57:04 +0000 Subject: [PATCH] rust/Makefile: Consider `HAVE_CARGO` in the clean target MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes `make clean` errors when cargo is not available: $ make clean ... | make[1]: Entering directory '/home/mhartmay/storage/git/poky/build/workspace/sources/s390-tools/rust' | cargo clean --release | /bin/bash: cargo: command not found | make[1]: *** [Makefile:72: clean] Error 127 Reviewed-by: Steffen Eiden Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- rust/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/Makefile b/rust/Makefile index 4c49d75c..03858a97 100644 --- a/rust/Makefile +++ b/rust/Makefile @@ -74,7 +74,9 @@ print-rust-targets: echo $(BUILD_TARGETS) clean: +ifneq (${HAVE_CARGO},0) $(CARGO_CLEAN) ${ALL_CARGOFLAGS} +endif # CARGO $(RM) -- .check-dep-pvtools .detect-openssl.dep.c .check-cargo rust-test: $(CARGO_TEST_TARGETS)