You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by le...@apache.org on 2023/05/12 03:06:24 UTC

[apisix] branch master updated: fix: add `rust-check` target to the makefile for deps pre-checking (#9453)

This is an automated email from the ASF dual-hosted git repository.

leslie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 4419d0d8e fix: add `rust-check` target to the makefile for deps pre-checking (#9453)
4419d0d8e is described below

commit 4419d0d8eb3daf901a1cf6fd4d2f806e579dced9
Author: Traky Deng <tr...@gmail.com>
AuthorDate: Fri May 12 11:06:17 2023 +0800

    fix: add `rust-check` target to the makefile for deps pre-checking (#9453)
---
 Makefile | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 5a82f5e93..3a55a85ae 100644
--- a/Makefile
+++ b/Makefile
@@ -147,10 +147,18 @@ help:
 	fi
 	@echo
 
+### check-rust : check if Rust is installed in the environment
+.PHONY: check-rust
+check-rust:
+	@if ! [ $(shell command -v rustc) ]; then \
+		echo "ERROR: Rust is not installed. Please install Rust before continuing." >&2; \
+		exit 1; \
+	fi;
+
 
-### deps : Installation dependencies
+### deps : Installing dependencies
 .PHONY: deps
-deps: runtime
+deps: check-rust runtime
 	$(eval ENV_LUAROCKS_VER := $(shell $(ENV_LUAROCKS) --version | grep -E -o "luarocks [0-9]+."))
 	@if [ '$(ENV_LUAROCKS_VER)' = 'luarocks 3.' ]; then \
 		mkdir -p ~/.luarocks; \
@@ -164,7 +172,7 @@ deps: runtime
 	fi
 
 
-### undeps : Uninstallation dependencies
+### undeps : Uninstalling dependencies
 .PHONY: undeps
 undeps:
 	@$(call func_echo_status, "$@ -> [ Start ]")