• 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: dst
              dst: src
                      cp -p src dst
    
         Since `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 会自动这么做。

    后文待续

  • 相关阅读:
    [LeetCode] 25.Reverse Nodes in k-Group-2
    [LeetCode] 25.Reverse Nodes in k-Group[UNSOLVED]
    [Leetcode] 24. Swap Nodes in Pairs
    [ProcessTree]How to list process tree / 如何显示进程树
    [Windows事件管理器]安全审核的文档
    [vdebench]文件系统的联机测试
    [Windows]多网卡配置网卡优先级
    [Ubuntu]开机紫屏的解决方法
    [USDA]查询食物热量和微量元素
    [Python]使用timer测量代码的执行速度
  • 原文地址:https://www.cnblogs.com/gaojian/p/2701066.html
Copyright © 2020-2023  润新知