What does it mean to 'touch' a target in make?
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.
精彩评论