MATLAB: Can I add all sub-directories within a directory to the include path in the MCC command in MATLAB Compiler 4.10 (R2009a)

adddirectoryiMATLAB Compilermccoptionrecursive

I am using MATLAB Compiler 4.10 (R2009a) to create a standalone executable. As I need to generate a new version of the standalone application everyday based on changes made to the source files, I have created a DOS batch file which contains a call to the executable file MCC.
During the compilation process, I use the -I option to specify additional directories to be included in the search path. For example, I use the MCC command as shown below:
mcc -m -d .\myOutputDir\src -I %MY_SOURCE%myDir\myFiles -I %MY_SOURCE%myDir\myFiles\dir1 myMainCode.m
Depending upon the modifications made to the source files, my function "myMainCode.m" may or may not have dependencies in sub-directories of the "myFiles" directory. However, as the -I option does add sub-directories within the specified directory to the include path, I have to add them explicitly. Additionally, some versions of the source code require the creation of new directories within the "myFiles" directory. This requires me to modify the batch file every time a change is made.
It would be very beneficial if the -I option recursively adds all subdirectories within the top level directory specified. Otherwise, it would be very helpful to provide an additional command line option to add directories recursively.

Best Answer

The ability to add sub-directories located under the directory specified in the -I option is not available in MATLAB Compiler.
To work around this issue, you can:
1. Add each directory to be included in the search path explicitly using the -I option.
2. Use the -a to add the entire contents of a directory including sub-directories to the CTF archive. This option would lead to a lot of redundant files being added to the CTF archive.