Update build system files - extract common parts.