gpt4 book ai didi

makefile - 如何制作轨道时间戳

转载 作者:行者123 更新时间:2023-12-02 10:47:53 25 4
gpt4 key购买 nike

make 如何保留文件的时间戳?我正在尝试将我的 git 存储库部署到位。我正在为大多数不会改变的文件添加预编译的二进制文件。现在,当我从 git checkout 存储库时,我不想编译这些 c 文件。我想使用这些预构建的二进制文件。因此,为了设置这个方案,我想知道 makefile 如何跟踪时间戳。谁能帮我吗?

谢谢

最佳答案

make 查看最后修改时间。来自 GNU make manual :

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.

来自 IEEE Std 1003.1-2008 make manual :

The make utility examines time relationships and shall update those derived files (called targets) that have modified times earlier than the modified times of the files (called prerequisites) from which they are derived.

您可以使用touch :

touch - change file access and modification times

必要时调整时间戳。

关于makefile - 如何制作轨道时间戳,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7507355/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com