Most html files are generated and we know their dates:

$ hg log --limit 1 --template '{date|date}' include/petscsnes.h
Mon Mar 19 22:42:51 2012 -0500

Similarly for inserting the date-string into the non-generated pages.

Ok? This is indeed what I'm using for getting the date for each page. Are you talking about something else with the makefile or what?