47 Star 215 Fork 77

GVP赵建辉/oui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
node.mk 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
赵建辉 提交于 2024-01-19 23:44 . node.mk: fix code style
define ColorInfo
tput setaf 6;echo $1;tput sgr0
endef
define ColorError
tput setaf 1;echo $1;tput sgr0
endef
ifneq ($(CONFIG_OUI_USE_HOST_NODE),)
NODE_PATH := PATH=$(PATH)
else
NODE_PATH := PATH=$(STAGING_DIR_HOSTPKG)/bin
endif
NODE := $(NODE_PATH) node
NPM := $(NODE_PATH) npm
NODE_BIN := $(shell $(NODE_PATH) $(STAGING_DIR_HOST)/bin/which node)
ifneq ($(NODE_BIN),)
NODE_VER := $(shell $(NODE_BIN) -v | sed 's/v//')
endif
define CheckNode
$(call ColorInfo, "Checking Node.js for building oui..."); \
if [ -n "$(CONFIG_OUI_USE_HOST_NODE)" ]; \
then \
$(call ColorInfo, "Using Node.js from Host"); \
else \
$(call ColorInfo, "Using Node.js from OpenWrt"); \
fi; \
if [ -z "$(NODE_VER)" ]; \
then \
$(call ColorError, "Node.js $(1)+ is required");false; \
else \
$(call ColorInfo, "Node.js path: $(NODE_BIN)"); \
$(call ColorInfo, "Node.js version: $(NODE_VER)"); \
if [ "$(shell echo $(NODE_VER) | awk '{if ($$1 >= $(1)) { printf "ok" }}')" != "ok" ]; \
then \
$(call ColorError, "Node.js $(1)+ is required");false; \
fi \
fi
endef
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/zhaojh329/oui.git
git@gitee.com:zhaojh329/oui.git
zhaojh329
oui
oui
master

搜索帮助

Cb406eda 1850385 E526c682 1850385