User`s guide

Using Pathnames
Using Pathnames
IfyouspecifyafullpathnametoanM-fileonthemcc comm and line, MATLAB
Compiler
1 Breaks the full name into the corresponding pathname and filenames
(<
path>and<file>).
2 Replaces the full pathname in the argument list with -I <path> <file>”.
For example,
mcc -m /home/us
er/myfile.m
would b e treated as
mcc -m -I /home/
user myfile.m
In rare situations, this behavior can lead to a potential source of confusion.
For examp le, suppose you have two different M-files that are both nam ed
myfile.m and they reside in /home/ user/dir1 and /home/user/dir2.The
command
mcc -m -I /home/
user/dir1 /home/user/ dir 2/myfile.m
would be equivalent to
mcc -m -I /home/
user/dir1 -I /home/user/dir2 myfile.m
MATLAB Compiler finds the myf ile.m in dir1 and compiles it instead of the
one in
dir2 because of the behavior of the -I option. If you are concerned that
this might be ha ppe nin g, you can spe cify the
-v option and then see wh ich
M-file MATLAB Com piler parses. The
-v option prints the full pathname to
the M-file during the dependency analysis phase.
Note MATLAB Compiler produces a warning (specifie d_fi le_mismatch)if
a file w ith a full pathname is included on the comm and line and MATLAB
Compiler finds it somewhe re else.
5-7