makefiles: Automatically update the EXTRASUBDIRS variable in make_makefiles.