kframework / k-legacy

The K tools (deprecated, see README)

Home Page:http://kframework.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kompile should updated modification time of produced `-kompiled` directory

bmmoore opened this issue · comments

It seems that the directory time is not changed if you recompile when an old -kompiled directory exists. This works poorly with make, which then thinks it always needs to run kompile.

In posix, the modification time of a directory changes only when a file is added or removed from the directory, not when the contents any of it's files change. This makes sense, because you'd otherwise have to recurse upwards and change the modified time all the way up to the root of the filesystem.

If you want this for writing a Makefile, you can instead depend on *-kompiled/kore.txt or *-kompiled/extras/timestamp

I have an existing makefile that was trying to depend directly on the -kompiled directory. I can change it as you suggest.