开发者

What does it mean to 'touch' a target in make?

开发者 https://www.devze.com 2023-01-11 01:26 出处:网络
For example, from the mingw32-make.exe --h开发者_JS百科elp option: -t, --touchTouch targets instead of remaking them.

For example, from the mingw32-make.exe --h开发者_JS百科elp option:

-t, --touch                 Touch targets instead of remaking them.


It just means to update the file modification time, so that next time, it won't consider those files old.


Touching a file means to effectively make a write to the file, but without changing any file data.

If the file doesn't exist, it'll be created as an empty file, otherwise its modification time will just be updated to the present time.


Touching a file means creating it if it doesn't already exist and updating its modification date, so using -t will probably make make think that everything was compiled, but not actually compile everything.

0

精彩评论

暂无评论...
验证码 换一张
取 消