当前位置: 首页 > article >正文

5规则中的命令

一条规则可以有多行命令,按顺序执行

使用@不在终端打印命令本身
Normally make prints each line of the recipe before it is executed.
When a line starts with ‘@’, the echoing of that line is suppressed.
The ‘@’ is discarded before the line is passed to the shell.

默认情况下,每一行命令都在一个单独的shell中被执行

Makefile中命令扩展使用$(shell command)或者`command`,不要使用$(),$()是用来引用Makefile中的变量
-i:忽略过程中的错误,继续执行
To ignore errors in a recipe line, write a ‘-’ at the beginning of the line’s text.
clean:
	-rm -f *.o
This causes make to continue even if rm is unable to remove a file.
make -C sub_dir#进入sub_dir中, 执行make命令
make -C sub_dir <target_name>#进入sub_dir中, 执行make命令, 指定target

#执行make -C sub_dir会打印下面信息,[]中的数字表示递归的层级
make[1]: Entering directory 'sub_dir的实际绝对路径'
在sub_dir目录下执行make产生的日志
make[1]: Leaving directory 'sub_dir的实际绝对路径'

https://www.gnu.org/software/make/manual/html_node/Recursion.html
https://www.gnu.org/software/make/manual/html_node/_002dw-Option.html
https://www.gnu.org/software/make/manual/html_node/Echoing.html


http://www.kler.cn/news/358297.html

相关文章:

  • Dubbo的负载均衡与故障服务规避机制详解
  • [Bert模型微调]
  • TOMCAT Using CATALINA——OPTS,闪退解决方法(两种)
  • oracle ORA-24920:列大小对于客户机过大
  • 【AIGC】智能创作的革新与未来展望
  • PMOS和NMOS管
  • iOS 大数相乘
  • 【Bug】STM32串口空闲中断接收不定长数据异常
  • PyTorch:强大灵活的深度学习框架
  • 多IP访问浏览器
  • Mybatis 直接传入sql执行, 并且传入参数List<Object> params
  • Ubuntu设置静态IP地址
  • C控制语句
  • 车辆电气化集成式 E/E 系统 应对车辆电气化挑战的端到端解决方案
  • 嵌入式开发介绍以及项目示例
  • python如何提取MYSQL数据,并在完成数据处理后保存?
  • 基于springboot+thymeleaf+springsecurity搭建一套web小案例
  • mysql--视图
  • IDEA使用Alibaba Cloud Toolkit插件自动化部署jar包
  • qs插件使用