Main Content

getNonBuildFiles

Get nonbuild-related files from build information

Description

files = getNonBuildFiles(buildinfo, concatenatePaths,replaceMatlabroot,includeGroups,excludeGroups) returns the names of non-build files from the build information, such as DLL files required for a final executable or a README file.

The function requires the buildinfo, concatenatePaths, and replaceMatlabroot arguments. You can use optional includeGroups and excludeGroups arguments. These optional arguments let you include or exclude groups selectively from the non-build files returned by the function.

If you choose to specify excludeGroups and omit includeGroups, specify a null character vector ('') for includeGroups.

The makefile for the build resolves file locations based on source paths and rules. The build process does not require you to resolve the path of every file in the build information. If you specify true for the concatenatePaths argument, the getNonBuildFiles function returns the path for each file:

  • If a path was explicitly associated with the file when it was added.

  • If you called updateFilePathsAndExtensions (Simulink Coder) to resolve file paths and extensions before calling getIncludeFiles.

example

Examples

collapse all

Get the nonbuild file names stored in the build information, myBuildInfo.

myBuildInfo = RTW.BuildInfo;
addNonBuildFiles(myBuildInfo,{'readme.txt' 'myutility1.dll' ...
   'myutility2.dll'});
nonbuildfiles = getNonBuildFiles(myBuildInfo,false,false);
>> nonbuildfiles

nonbuildfiles = 

    'readme.txt'    'myutility1.dll'    'myutility2.dll'

Input Arguments

collapse all

RTW.BuildInfo object that contains information for compiling and linking generated code.

SpecifyFunction Action
trueConcatenates and returns each file name with its corresponding path.
falseReturns only file names.

Example: true

Use the replaceMatlabroot argument to control whether the function includes the MATLAB® root definition in the output that it returns.

SpecifyFunction Action
trueReplaces the token $(MATLAB_ROOT) with the absolute path for your MATLAB installation folder.
falseDoes not replace the token $(MATLAB_ROOT).

Example: true

Group names of non-build files to include in the return from the function, specified as a string or a cell array of character vectors. To view the group name of a non-build file, access the Group property of the corresponding object.

Example: ''

Group names of non-build files to exclude from the return from the function, specified as a string or a cell array of character vectors. To view the group name of a non-build file, access the Group property of the corresponding object.

Example: ''

Output Arguments

collapse all

Names of non-build files from the build information.

Version History

Introduced in R2008a