Class: coder.make.BuildTool
Package: coder.make
Set file extension for named file type in FileExtensions
h.setFileExtension(name,value)
sets
the extension value of the named file type in h
.setFileExtension(name
,value
)coder.make.BuildTool.FileExtensions
.
The following example code shows setFileExtension
in a portion of the
intel_tc.m
file from the Adding a Custom Toolchain tutorial.
% ------------------------------ % C Compiler % ------------------------------ tool = tc.getBuildTool('C Compiler'); tool.setName('Intel C Compiler'); tool.setCommand('icl'); tool.setPath(''); tool.setDirective('IncludeSearchPath','-I'); tool.setDirective('PreprocessorDefine','-D'); tool.setDirective('OutputFlag','-Fo'); tool.setDirective('Debug','-Zi'); tool.setFileExtension('Source','.c'); tool.setFileExtension('Header','.h'); tool.setFileExtension('Object','.obj'); tool.setCommandPattern('|>TOOL<| |>TOOL_OPTIONS<| |>OUTPUT_FLAG<||>OUTPUT<|');
tc = coder.make.ToolchainInfo; tool = tc.getBuildTool('C Compiler'); blditm = coder.make.BuildItem('CD','.cd')
bldtm = Macro : CD Value : .cd
tool.addFileExtension('SourceX',blditm) value = tool.getFileExtension('SourceX')
value = .cd
tool.setFileExtension('SourceX','.ef') value = tool.getFileExtension('SourceX')
value = .ef