Main Content

addFileExtension

Class: coder.make.BuildTool
Package: coder.make

Add new file extension entry to FileExtensions

Syntax

h.addFileExtension(name,buildItemHandle)

Description

h.addFileExtension(name,buildItemHandle) creates a named extension, assigns a coder.make.BuildItem object to it, and adds it to coder.make.BuildTool.FileExtensions.

Input Arguments

expand all

Object handle for a coder.make.BuildTool object, specified as a variable.

Example: tool

Name of file type, specified as a character vector.

Data Types: char

BuildItem handle, specified as a coder.make.BuildItem object that contains an option value.

Example: bi

Examples

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