Change makedate script into a template

In order to change date.inc to be a bit more system independent, change it into a template that cmake fills in.