do not care about file timestamps anymore and use git tags and
current commit instead. Either we are in the git repository or
this is a released archive so we use .scmversion which will be
exported by makedist script later.
The versioning scheme is really simple. Version is represented by the
latest tag (so the latest release) and the release is the topmost commit
in the current branch. If the topmost commit is the tagged one (release)
we do not need the top most commit and we can omit it to have things
If the tree contains any uncommitted changes (to the tracked files of
course) we will add -dirty suffix.
This should be sufficient to exactly identify tree which has been used
for the compilation.