updateFileSeparator - Change file separator used in model's build information

Syntax

updateFileSeparator(buildinfo, separator)

Arguments

buildinfo

Build information returned by RTW.BuildInfo.

separator

A character array that specifies the file separator \ (Windows®) or / (UNIX®) to be applied to all file path specifications.

Description

The updateFileSeparator function changes all instances of the current file separator (/ or \) in a model's build information to the specified file separator.

The default value for the file separator matches the value returned by the MATLAB® command filesep. For makefile based builds, you can override the default by defining a separator with the MAKEFILE_FILESEP macro in the template makefile (see Cross-Compiling Code Generated on a Microsoft® Windows® System. If the GenerateMakefile parameter is set, the Real-Time Workshop® software overrides the default separator and updates the model's build information after evaluating the PostCodeGenCommand configuration parameter.

Examples

Update object myModelBuildInfo to apply the Windows file separator.

myModelBuildInfo = RTW.BuildInfo;
updateFileSeparator(myModelBuildInfo, '\');

See Also

addIncludeFiles, addIncludePaths, addSourceFiles, addSourcePaths, updateFilePathsAndExtensions
Programming a Post Code Generation Command, Cross-Compiling Code Generated on a Microsoft® Windows® System

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS