GNU make manual 翻译(二)

阅读: 评论:0

GNU make manual 翻译(二)

GNU make manual 翻译(二)

继续翻译

Preparing and Running Make    
==========================    To prepare to use `make', you must write a file called the    
makefile that describes the relationships among files in your program    
and provides commands for updating each file.  In a program, typically,    
the executable file is updated from object files, which are in turn    
made by compiling source files.    Once a suitable makefile exists, each time you change some source    
files, this simple shell command:    make    suffices to perform all necessary recompilations.  The `make' program    
uses the makefile data base and the last-modification times of the    
files to decide which of the files need to be updated.  For each of    
those files, it issues the recipes recorded in the data base.    You can provide command line arguments to `make' to control which    
files should be recompiled, or how.  *Note How to Run `make': Running.    

准备和运行 make

为了准备运行 make, 你必须写一个名为 "makefile" 的文件。该文件描述你的程序项目中的文件之间关系,

也提供改变各个文件的指令。

在一个典型的程序项目中,可执行文件由 目标文件而来,而目标文件又是由对源文件的编译而来。

一旦做好了一个适当的 makefile, 每次你修改一些源文件的时候,下面的简单的shell 命令:

  make

就会担当起所有重新编译的任务。这个 make 程序使用  makefile中的数据信息 和 各文件的被修改时间,

来决定那些文件需要被改变。对每一个需要被改变的文件,它都会根据 makefile的数据信息来执行相应的指令片段。

你可以向make 提供 命令行参数, 来控制那些文件需要被重新编译和如何被重新编译。

后文待续

转载于:.html

本文发布于:2024-01-31 09:18:51,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/170666393427474.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

上一篇:08.04有名管道
标签:GNU   manual
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23