Updated gendocs to work for multiple versions.