当前位置:网站首页>Black cat takes you to learn Makefile Part 12: Summary of common Makefile problems
Black cat takes you to learn Makefile Part 12: Summary of common Makefile problems
2022-08-10 22:00:00 【Senior black cat】
This article is compiled/written based on personal work/study experience and online data. Paid content is prohibited from being reproduced.
The column where this article is located "Black cat takes you to learn Makefile"
In the process of work/study, even if the makefile is deeply studied, there are still many miscellaneous problems. This article summarizes these problems for easy reference.
1 Pseudo-target.PHONY : Reason for clean
There are two reasons for using pseudo targets:
1. Avoid the command-only target defined in our Makefile (the purpose of this target is to execute a series of commands without creating this target) andThe actual file in the working directory has a name conflict.
2. Improve the efficiency of executing make, especially for a large-scale project, you may also care about the efficiency of compilation.
If we need to write such a rule: the defined command is not to create an object file, but to use make to specify a specific target to execute some specific commands.like below:
clean:rm *.o temp
The "rm" in the rule is not the command to create the file "clean", it just deletes all .o files and temp files in the current directory.When the file "clean" does not exist in the working directory, after we enter "make clean", "rm *.o temp" will always be executed.This is our original intention.
But when
边栏推荐
- 深度学习之 12 循环神经网络RNN2
- Likou 221 questions, the largest square
- 【nvm】【node多版本管理工具】使用说明和踩坑(exit status 1)
- DDL:ALTER 修改数据库——《mysql 从入门到内卷再到入土》
- 【vulhub】MySql身份认证绕过漏洞复现(CVE-2012-2122)
- 【Maui正式版】创建可跨平台的Maui程序,以及有关依赖注入、MVVM双向绑定的实现和演示
- ES6中的for...in/of的使用
- ACM模板笔记:最长不下降/上升子序列
- Huawei router clock near the drainage experiment (using stream strategy)
- 快消品行业经销商协同系统:实现经销商可视化管理,提高沟通执行效率
猜你喜欢
JS中的filter、map、reduce
Thread State 详解
深度学习之 12 循环神经网络RNN2
FPGA - 7系列 FPGA内部结构之Memory Resources -03- 内置纠错功能
Exploration and practice of the "zero trust" protection and data security governance system of the ransomware virus of Meichuang Technology
JVM经典五十问,这下面试稳了
翻译科技论文,俄译中怎样效果好
LeetCode-36-Binary search tree and doubly linked list
【Maui正式版】创建可跨平台的Maui程序,以及有关依赖注入、MVVM双向绑定的实现和演示
The use of TortoiseSVN little turtle
随机推荐
【PCBA方案】电子握力测试仪方案she‘ji
[Golang]用反射让你的代码变优美
着力提升制造业核心竞争力,仪器仪表产业迎高质量发展
地理探测器Geodetector软件的下载、应用与结果解读
ArcMap创建镶嵌数据集、导入栅格图像并修改像元数值显示范围
第14届全国大学生信息安全竞赛-创新实践能力赛
力扣221题,最大正方形
ENVI感兴趣区ROI文件由XML格式转为ROI格式
ENVI自动生成地面控制点实现栅格影像的自动地理配准
卡片盒笔记法的操作步骤
2022.8.9 模拟赛
About DataFrame: Processing Time
【Maui正式版】创建可跨平台的Maui程序,以及有关依赖注入、MVVM双向绑定的实现和演示
Web Reverse Lilac Garden
快消品行业经销商协同系统:实现经销商可视化管理,提高沟通执行效率
翻译科技论文,俄译中怎样效果好
直播课堂系统08补-腾讯云对象存储和课程分类管理
自组织是管理者和成员的双向奔赴
Detailed explanation of the use of Oracle's windowing function (2)
力扣215题,数组中的第K个最大元素