Fix buildinfo generation

Make the buildinfo generation consistent using the BuildInfoCode build rule.