def _GenerateMSBuildFiltersFile(filters_path, source_files, rule_dependencies, extension_to_rule_name):
 filter_group = []
 source_group = []
 _AppendFiltersForMSBuild('', source_files, rule_dependencies, extension_to_rule_name, filter_group, source_group)
 if filter_group:
  content = ['Project', {'ToolsVersion': '4.0', 'xmlns': 'http://schemas.microsoft.com/developer/msbuild/2003'}, (['ItemGroup'] + filter_group), (['ItemGroup'] + source_group)]
  easy_xml.WriteXmlIfChanged(content, filters_path, pretty=True, win32=True)
 elif os.path.exists(filters_path):
  os.unlink(filters_path)

def _GenerateMSBuildFiltersFile ( filters_path , source_files , rule_dependencies , extension_to_rule_name ) : filter_group = [ ] source_group = [ ] _AppendFiltersForMSBuild ( '' , source_files , rule_dependencies , extension_to_rule_name , filter_group , source_group ) if filter_group : content = [ 'Project' , { 'ToolsVersion' : '4.0' , 'xmlns' : 'http://schemas.microsoft.com/developer/msbuild/2003' } , ( [ 'ItemGroup' ] + filter_group ) , ( [ 'ItemGroup' ] + source_group ) ] easy_xml . WriteXmlIfChanged ( content , filters_path , pretty = True , win32 = True ) elif os . path . exists ( filters_path ) : os . unlink ( filters_path )
generate the filters file .