1 Star 1 Fork 0

DeeZeng/hdl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
quiet.mk 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
####################################################################################
## Copyright (c) 2018 - 2021 Analog Devices, Inc.
## SPDX short identifier: BSD-1-Clause
####################################################################################
ifdef MAKE_TERMOUT
ESC:=$(shell printf '\033')
GREEN:=$(ESC)[1;32m
RED:=$(ESC)[1;31m
HL:=$(ESC)[0;33m
NC:=$(ESC)[0m
else
GREEN:=
RED:=
HL:=
NC:=
endif
ifneq ($(VERBOSE),1)
MAKEFLAGS += --quiet
# build - Run a build command
# $(1): Command to execute
# $(2): Logfile name
# $(3): Textual description of the task
define build
@echo -n "Building $(strip $(3)) [$(HL)$(CURDIR)/$(strip $(2))$(NC)] ..."
$(strip $(1)) >> $(strip $(2)) 2>&1; \
(ERR=$$?; if [ $$ERR = 0 ]; then \
echo " $(GREEN)OK$(NC)"; \
else \
echo " $(RED)FAILED$(NC)"; \
echo "For details see $(HL)$(CURDIR)/$(strip $(2))$(NC)"; \
echo ""; \
fi; exit $$ERR)
endef
# clean - Run a clean command
# $(1): Files to remove
# $(2): Textural description of the task
define clean
@echo "Cleaning $(strip $(2)) ..."
-rm -rf $(strip $(1))
endef
else
define build
$(strip $(1)) >> $(strip $(2)) 2>&1
endef
define clean
-rm -rf $(strip $(1))
endef
endif
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Verilog
1
https://gitee.com/deezeng/hdl.git
git@gitee.com:deezeng/hdl.git
deezeng
hdl
hdl
master

搜索帮助