Generate info on revision and datetime

To have an info about when it was generated, add the git revision (if
not from stdio) and datetime info to the header.