Main Content

addNonBuildFiles

Add nonbuild-related files to build information

Description

example

addNonBuildFiles(buildinfo,filenames,paths,groups) specifies nonbuild-related files and paths to add to the build information.

The function requires the buildinfo and filenames arguments. You can use an optional paths argument to specify the included file paths and use an optional groups argument to group your options.

The code generator stores the nonbuild-related file and path options in a build information object. The function adds options to the object based on the order in which you specify them.

Examples

collapse all

Add the nonbuild-related file readme.txt to the build information myBuildInfo, and place the file in the group DocFiles.

myBuildInfo = RTW.BuildInfo;
addNonBuildFiles(myBuildInfo, ... 
   'readme.txt','/proj/docs','DocFiles');

Add the nonbuild-related files myutility1.dll and myutility2.dll to the build information myBuildInfo, and place the files in the group DLLFiles.

myBuildInfo = RTW.BuildInfo;
addNonBuildFiles(myBuildInfo, ... 
   {'myutility1.dll' 'myutility2.dll'}, ...
   '/proj/dlls','DLLFiles');

Add nonbuild-related files (.dll files identified with a wildcard character) in a specified folder to the build information myBuildInfo, and place the files in the group DLLFiles.

myBuildInfo = RTW.BuildInfo;
addNonBuildFiles(myBuildInfo, ... 
   '*.dll','/proj/dlls','DLLFiles');

Input Arguments

collapse all

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

You can specify the filenames argument as a character vector, as an array of character vectors, or as a string. If you specify the filenames argument as multiple character vectors, for example, 'etc.dll' 'etc_private.dll', the filenames argument is added to the build information as an array of character vectors.

If the dot delimiter (.) is present, the file name text can include wildcard characters. Examples are '*.*', '*.dll', and '*.d*'.

The function removes duplicate nonbuild-related file entries with an exact match of a path and file name to a previously defined entry in the build information object.

Example: '*.dll'

You can specify the paths argument as a character vector, as an array of character vectors, or as a string. If you specify a single path as a character vector, the function uses that path for all files. If you specify the paths argument as multiple character vectors, for example, '/proj/dll' and '/proj/docs', the paths argument is added to the build information as an array of character vectors.

Example: '/proj/dll'

You can specify the groups argument as a character vector, as an array of character vectors, or as a string. If you specify multiple groups, for example, 'DLLFiles' 'DLLFiles' 'DocFiles', the function relates the groups to the filenames in order of appearance. For example, the filenames argument ''myutility1.dll'' ''myutility2.dll'' 'readme.txt' is an array of character vectors with three elements. The first element is in the 'DLLFiles' group, the second element is in the 'DLLFiles' group, and the third element is in the 'DocFiles' group.

Example: 'DLLFiles' 'DLLFiles' 'DocFiles'

Version History

Introduced in R2008a