GNU make manual 翻译( 一百二十四)
继续翻译
Note that such a prerequisite constitutes mentioning `main.o' in a makefile, so it can never be considered an intermediate file by implicit rule search. This means that `make' won't ever remove the file after using it; *note Chains of Implicit Rules: Chained Rules.With old `make' programs, it was traditional practice to use this compiler feature to generate prerequisites on demand with a command like `make depend'. That command would create a file `depend' containing all the automatically-generated prerequisites; then the makefile could use `include' to read them in (*note Include::). In GNU `make', the feature of remaking makefiles makes this practice obsolete--you need never tell `make' explicitly to regenerate the prerequisites, because it always regenerates any makefile that is out of date. *Note Remaking Makefiles::.The practice we recommend for automatic prerequisite generation is to have one makefile corresponding to each source file. For each source file `NAME.c' there is a makefile `NAME.d' which lists what files the object file `NAME.o' depends on. That way only the source files that have changed need to be rescanned to produce the new prerequisites.
要注意对于在 makefile 中,此种前提条件,等同于提及了 main.o 文件,因此它绝不能被隐式规则搜索认为是一个中间文件。这意味着 make在使用此文件后 永不会删除它; *note Chains of Implicit Rules: Chained Rules.
对旧的 make 程序,使用这种类似于 make depend 的,编译器的命令行功能按需来生成前提条件是一种传统的做法。此命令会生成一个文件 'depend' 包含所有的 自动生成的前提条件;这样 makefile 可用 include 来读取它们 。(*note Include::)
在 GNU make 中,重新生成 makefile 的功能使得这种实践过时了 --你永远也不需要显式地告诉 make 去重新生成前提条件,因为它总是重新生成所有过期的makefile。*Note Remaking Makefiles::
我们建议的自动前提条件生成是,为每一个源文件安排一个makefile。对每一个名为 NAME.c 的源文件,都有一个名为 NAME.d 的makefile ,列出所有的 NAME.o 文件所依赖的目标文件。用这种方法,只有变更的源文件需要被重新扫描以生成新的前提条件。
后文待续
转载于:https://www.cnblogs.com/gaojian/archive/2012/09/26/2704207.html
GNU make manual 翻译( 一百二十四)相关推荐
- GNU make manual 翻译( 一百五十四)
继续翻译 6.1 Basics of Variable References =================================To substitute a variable's v ...
- GNU make manual 翻译( 一百六十四)
继续翻译 When you add to a variable's value with `+=', `make' acts essentially as if you had included th ...
- GNU make manual 翻译( 一百六十二)
继续翻译 6.5 Setting Variables =====================To set a variable from the makefile, write a line st ...
- GNU make manual 翻译( 一百八十二)
继续翻译 `ifdef VARIABLE-NAME' The `ifdef' form takes the _name_ of a variable as its argument, not a re ...
- GNU make manual 翻译( 一百五十五)
继续翻译 6.2 The Two Flavors of Variables ================================There are two ways that a vari ...
- GNU make manual 翻译( 一百二十一)
继续翻译 4.13 Double-Colon Rules =======================Double-colon rules are explicit rules written wi ...
- GNU make manual 翻译( 一百一十四)
继续翻译 4.10 Multiple Targets in a Rule ===============================A rule with multiple targets is ...
- GNU make manual 翻译( 一百五十九)
继续翻译 A computed variable name need not consist entirely of a single variable reference. It can conta ...
- GNU make manual 翻译( 一百七十五)
继续翻译 `.DEFAULT_GOAL' Sets the default goal to be used if no targets were specified onthe command lin ...
最新文章
- IDP申请直到软件上架流程 - iOS
- C#进行Visio二次开发之知识点考核试题
- Android 本地搭建Tomcat服务器供真机测试
- 一键清除Delphi中无用的文件
- BZOJ1084 [SCOI2005]最大子矩阵 动态规划
- OS- -调度(二)
- linux下线程控制
- 教育部:到2020年全面普及实名制网络学习空间
- LVM逻辑卷管理@设备、格式、摩、引导自己主动安装一个完整的章节
- 实用的工具 —— 百度云、everything(全局搜索)、Everest(硬件检测)、TechPowerUp GPU-Z
- “菁客”发布《2018中国移动社交招聘趋势报告》
- 都说发展存储产业一定要走IDM模式,你怎么看?
- oracle的权限授予,oracle权限命令
- 深度学习环境配置2——windows下的torch=1.2.0环境配置
- 利用ajax实现excel报表导出(解决乱码问题)
- 简易猜数1~100数字小游戏ovo
- unity调用安卓手机物理返回键和home键
- Git - 版本穿梭(时光穿梭机)
- pysot-toolkit--eval.py笔记(读取算法结果,根据评价指标计算结果并可视化)
- Nvidia jetson tx2 ubuntu16.04插入128GB内存卡报错:Unable to access/mount “128 GB Volume”
热门文章
- [USACO13MAR]Poker Hands【贪心】
- arts-week12
- unbantu安装 mysql --- 百度云
- 2017年10月21日23:43:02
- 协鑫集成等四家公司被退出欧盟MIP协议
- 《Python算法教程》——1.6 如果您感兴趣
- 存储过程系列之存储过程sql数据库调用和程序代码调用
- Core Temp-CPU温度计
- mybatis使用和分析
- evaluatejavascript不起作用_android4.4 evaluateJavascript 到android2.X上不能调用的问题