Can you make the profile thing a function defined gentoo's prepare so that you can just call it with a parameter or two in each relevant target?