Wednesday 20 February 2013

Files from the future and make

Ran into a problem today because I set the clock wrongly on a linux machine, built something using make, then realised that the clock was wrong. Now after setting the clock correctly, make starts throwing errors all over the place saying Clock Skew Detected: your build may be incomplete.

If you're sure that it's because of your mistake with setting the clock incorrectly, you can fix this by "touch"-ing all the files which are future dated. To do this we create a dummy file with the current date, ask find to show all files newer than this dummy file, and touch them:

touch dummy
find . -newer dummy | xargs touch
rm dummy