Unify build logic.