Main Content

addIntrinsicMacros

Class: coder.make.ToolchainInfo
Namespace: coder.make

Add intrinsic macro to Macros

Syntax

h.addIntrinsicMacros(intrnsc_macroname)

Description

h.addIntrinsicMacros(intrnsc_macroname) adds an intrinsic macro to Macros. The value of the intrinsic macro is defined by a build tool, not by ToolchainInfo or your MathWorks® software.

Input Arguments

expand all

A coder.make.ToolchainInfo object, specified using an object handle, such as h. To create h, enter h = coder.make.ToolchainInfo in a MATLAB® Command Window.

Intrinsic macro name or names, specified as a character vector, cell array of character vectors, string, or string array.

Examples

h.addIntrinsicMacros('GCCROOT')
h.getMacro('GCCROOT')
ans  = 

     []

h.removeIntrinsicMacros('GCCROOT')
h.getMacro('GCCROOT')

Tips

The value of intrinsic macros are intentionally not declared in ToolchainInfo. The value of the intrinsic macro is defined by the build tools in the toolchain, outside the scope of your MathWorks software.

During the software build process, your MathWorks software inserts intrinsic macros into a build artifact, such as a makefile, without altering their form. During the build process, the build artifact passes the intrinsic macros to the build tools in the toolchain. The build tools interpret the macros based on their own internal definitions.

The validate method does not validate the intrinsic macros.

Because intrinsic macros have undeclared values, they remain unchanged in the generated code, where they can be used and interpreted by the software build toolchain. In contrast, ordinary macros are replaced by their assigned values when you create them.

Version History

Introduced in R2013a