I think we need a more sophisticated version of this. Here's the thing : either we running make update to get latest master branches, or we want a specific git/svn commit, like we do for releases. Your current patch works well for the first case, not for the second. So, i think it would be a good idea to have the EP_AddCustomTargets macro take another optional argument, basically the requested branch/commit. If it's set to nothing, do waht you do now. Otherwise, instead do a git fetch and git reset --hard <SHA1>, to force the right commit. Same for svn below.