Changeset 895 for trunk/src/compile.m
- Timestamp:
- May 20, 2015, 11:21:25 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/compile.m
r830 r895 43 43 SubfctPath=['-I ' SubfctPath];%string indicating the option of including the path SubfctPath 44 44 end 45 45 hver=ver('MATLAB'); 46 FctNameVersion=[FctName '_MCRROOT' regexprep(hver.Version,'\.','')];%suppress the dot in version number 46 47 try 47 48 disp(['mcc -m -R -nojvm -R -nodisplay -R -singleCompThread ' SubfctPath ' ' FctName '.m']) 48 49 eval(['mcc -m -R -nojvm -R -nodisplay -R -singleCompThread ' SubfctPath ' ' FctName '.m'])% compile the source file [FctName .m], which produces a binary file FctName and a cmd file [run_' FctName '.sh] 49 50 system(['mv -f ' FctName ' bin/']);%move the binary file FctName to the subdir /bin 50 system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctName '.sh']);%modify the cmd file and copy it to [FctName '.sh']51 system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctNameVersion '.sh']);%modify the cmd file and copy it to [FctName '.sh'] 51 52 system(['rm run_' FctName '.sh']);% remove the initial cmd file [run_' FctName '.sh] 52 system(['chmod +x ' FctName '.sh']); % set the cmd file to 'executable'53 system(['chmod +x ' FctNameVersion '.sh']); % set the cmd file to 'executable' 53 54 catch ME 54 55 hh=msgbox_uvmat('ERROR',ME.message);
Note: See TracChangeset
for help on using the changeset viewer.