当前位置:网站首页>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
边栏推荐
- JVM classic fifty questions, now the interview is stable
- [SQL brush questions] Day3----Special exercises for common functions that SQL must know
- 函数:函数删除操作语法&使用例——《mysql 从入门到内卷再到入土》
- Application of Spatial 3D Model Reconstruction Based on Pix4Dmapper - Spatial Analysis and Site Selection
- Bedtime story | made a Bitmap and AST length system configuration
- 《mysql 从入门到内卷再到入土》——Mysql基础 学习笔记目录
- LeetCode-36-二叉搜索树与双向链表
- Live Classroom System 08 Supplement - Tencent Cloud Object Storage and Course Classification Management
- MATLAB神经网络拟合工具箱Neural Net Fitting使用方法
- UPDATE:修改数据语法使用例——《mysql 从入门到内卷再到入土》
猜你喜欢
随机推荐
Future与CompletableFuture
Before implementing MES management system, these three questions to consider
TCL:事务的特点,语法,测试例——《mysql 从入门到内卷再到入土》
ArcMap时间滑块功能动态显示图层数据并生成视频或动图
Live Classroom System 08-Tencent Cloud Object Storage and Course Classification Management
How to secure users in LDAP directory service?
论文解读(g-U-Nets)《Graph U-Nets》
Uniapp编译后小程序的代码反编译一些思路
Labelme-5.0.1 version edit polygon crash
labelme-5.0.1版本编辑多边形闪退
LeetCode-36-Binary search tree and doubly linked list
ACM解题笔记——HDU 1401 Solitaire(DBFS)
美创科技勒索病毒“零信任”防护和数据安全治理体系的探索实践
Interpretation of the paper (g-U-Nets) "Graph U-Nets"
【网络通信四】ping工具源码cmake工程编译以及运行说明
每次打开chrome会跳出What's new
《mysql 从入门到内卷再到入土》——Mysql基础 学习笔记目录
使用 Cloudreve 搭建私有云盘
工程师应该怎么学习
CGO Preliminary Cognition and Basic Data Type Conversion









