当前位置:网站首页>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 tempThe "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
边栏推荐
猜你喜欢

玩转doxygen 之RT-THREAD

Alibaba and Ant Group launched OceanBase 4.0, a distributed database, with single-machine deployment performance exceeding MySQL

Live Classroom System 08-Tencent Cloud Object Storage and Course Classification Management

直播课堂系统08-腾讯云对象存储和课程分类管理

ACM模板笔记:最长不下降/上升子序列

paddle 35 paddledetection保存训练过程中的log信息

Play RT-THREAD of doxygen

带你一文读懂SaaS版多租户商城系统对多品牌企业的应用价值

使用 Cloudreve 搭建私有云盘

C # Hex file transfer skills necessary article 】 【 bin file code implementation
随机推荐
The use of TortoiseSVN little turtle
Detailed explanation of the use of Oracle's windowing function (2)
微擎盲盒交友变现-vp_ph打开慢优化
测试代码新的规则
[Golang]如何优雅管理系统中的几十个UDF(API)
为什么一般公司面试结束后会说「回去等消息」,而不是直接告诉面试者结果?
工程师应该怎么学习
【PCBA scheme design】Bluetooth skipping scheme
Redis Performance Impact - Asynchronous Mechanisms and Response Latency
接口测试的概念、目的、流程、测试方法有哪些?
深度学习之 12 循环神经网络RNN2
Future与CompletableFuture
【vulhub】MySql身份认证绕过漏洞复现(CVE-2012-2122)
Shell编程规范与变量
着力提升制造业核心竞争力,仪器仪表产业迎高质量发展
自建函数 测试例和语法——《mysql 从入门到内卷再到入土》
LeetCode每日一题(1573. Number of Ways to Split a String)
翻译科技论文,俄译中怎样效果好
2022.8.9 模拟赛
DELETE:删除操作语法&使用例——《mysql 从入门到内卷再到入土》