GNU make manual 翻译( 一百零九)
生活随笔
收集整理的這篇文章主要介紹了
GNU make manual 翻译( 一百零九)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
繼續翻譯
`.LOW_RESOLUTION_TIME' If you specify prerequisites for `.LOW_RESOLUTION_TIME', `make' assumes that these files are created by commands that generate low resolution time stamps. The recipe for the `.LOW_RESOLUTION_TIME' target are ignored.The high resolution file time stamps of many modern file systems lessen the chance of `make' incorrectly concluding that a file is up to date. Unfortunately, some hosts do not provide a way to set a high resolution file time stamp, so commands like `cp -p' that explicitly set a file's time stamp must discard its subsecond part.If a file is created by such a command, you should list it as a prerequisite of `.LOW_RESOLUTION_TIME' so that `make' does not mistakenly conclude that the file is out of date. For example:.LOW_RESOLUTION_TIME: dstdst: srccp -p src dstSince `cp -p' discards the subsecond part of `src''s time stamp, `dst' is typically slightly older than `src' even when it is up to date. The `.LOW_RESOLUTION_TIME' line causes `make' to consider `dst' to be up to date if its time stamp is at the start of the same second that `src''s time stamp is in.Due to a limitation of the archive format, archive member time stamps are always low resolution. You need not list archive members as prerequisites of `.LOW_RESOLUTION_TIME', as `make' does this automatically.如果你為 .LOW_RESOLUTION_TIME 指定前提條件,make 認定這些文件被 生成 低清晰度時間戳的命令來省城。.LOW_RESOLUTION_TIME 目的的片段被忽略。
現代文件系統的高清晰度文件時間戳會減少 make 錯誤地認為一個文件已經陳舊的問題。但是不幸的是,某些系統沒有提供一種方式來設定高清晰度文件時間戳,因此某些命令比如 cp -p 這樣的,顯式設定文件時間戳,卻必須把跌入個部分切掉了。如果一個文件由這樣的命令創建,你應當把它列為 .LOW_RESOLUTION_TIME 的前提條件,這樣 make 就不會錯誤地得出結論認為此文件陳舊了。例如:
.LOW_RESOLUTION_TIME: dst
dst: src
cp -p src dst
由于 cp -p 切掉了 src 文件時間戳的第二部分,所以 dst 會比src 舊一些,.LOW_RESOLUTION_TIME 行使得 make 認為 ,當 dst 的時間戳和src 一樣的時候,dst 是比較新的。
由于 庫文件格式的限制,庫文件成員的時間戳總是低解析度的。你不需要把庫文件成員列為.LOW_RESOLUTION_TIME的前提條件,因為 make 會自動這么做。
后文待續
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的GNU make manual 翻译( 一百零九)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 一种简便的ios图片加密方法-对图片进行
- 下一篇: sql2005/sql2000 向表中循