Update the targets file during the build