auto: doc: improvements to version-stamp makefile logic.

This just improves the version stamp, which was not being regenerated in cached workspaces even when the version changed. Also adds it to the pdf.