makefile - makefile 中的条件错误
问题描述
我的 MakeFile 中有以下命令:
.PHONY: lint
lint:
eslint src --ext ts
.PHONY: component
component:
ifndef name
$(error name is not set. try 'make component name=')
endif
问题是当我运行make lint
或任何其他命令时,make 退出并出现component
.
我将如何阻止这种情况发生?
解决方案
推荐阅读
- reactjs - react-hook-form 处理handleSubmit中的服务器端错误
- visual-studio-code - Chrome OS vscode:// 和其他链接未打开,给出“Google Chrome OS 无法打开此页面”
- javascript - 当我需要放置一些 DATE 类型的变量时,我无法使用 node.js 将其插入数据库
- excel - 如何在excel中创建一个If函数来评估一列中是否有文本,然后输出“n”(文本)或“y”(无文本)?
- php - 在 PHP 中的变量中使用带有数组元素的变量变量来创建数组元素
- javascript - 如何打印工作表的名称和 Google ID
- nginx - 当指向 Kubernetes 服务时,nginx 解析器的行为如何?
- sas - SAS:将数字转换为字符值
- python - 如何打印矩阵以便有不同的行和列?
- python - 练习邻接表和 BFS 的编码练习