Changeset 746 for trunk/src/compile.m
- Timestamp:
- Apr 20, 2014, 6:19:08 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/compile.m
r606 r746 8 8 function compile (FctName,SubfctPath) 9 9 if isempty(which('mcc')) 10 msgbox_uvmat(' no Matlab compiler toolbox mcc installed')10 msgbox_uvmat('ERROR','no Matlab compiler toolbox mcc installed') 11 11 return 12 else 13 hh=msgbox_uvmat('INFO',['compilation of ' FctName ' in progress...']); 12 14 end 13 15 disp(['compiling ' FctName ' ...']) … … 23 25 end 24 26 disp(['mcc -m -R -nojvm -R -nodisplay ' SubfctPath ' ' FctName '.m']) 25 eval(['mcc -m -R -nojvm -R -nodisplay ' SubfctPath ' ' FctName '.m'])% compile the source file [FctName .m], which produces a binary file FctName and a cmd file [run_' FctName '.sh] 26 %eval(['mcc -m -R -nojvm -R -nodisplay ' FctName '.m'])% compile the source file [FctName .m], which produces a binary file FctName and a cmd file [run_' FctName 27 system(['mv -f ' FctName ' bin/']);%move the binary file FctName to the subdir /bin 28 system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctName '.sh']);%modify the cmd file and copy it to [FctName '.sh'] 29 system(['rm run_' FctName '.sh']);% remove the initial cmd file [run_' FctName '.sh] 30 system(['chmod +x ' FctName '.sh']); % set the cmd file to 'executable' 27 try 28 eval(['mcc -m -R -nojvm -R -nodisplay ' SubfctPath ' ' FctName '.m'])% compile the source file [FctName .m], which produces a binary file FctName and a cmd file [run_' FctName '.sh] 29 system(['mv -f ' FctName ' bin/']);%move the binary file FctName to the subdir /bin 30 system(['sed -e ''''s#/' FctName '#/bin/' FctName '#'''' run_' FctName '.sh > ' FctName '.sh']);%modify the cmd file and copy it to [FctName '.sh'] 31 system(['rm run_' FctName '.sh']);% remove the initial cmd file [run_' FctName '.sh] 32 system(['chmod +x ' FctName '.sh']); % set the cmd file to 'executable' 33 catch ME 34 msgbox_uvmat('ERROR',ME.message); 35 end 31 36 display('** END **') 32 end 37 delete(hh) 33 38 34 39
Note: See TracChangeset
for help on using the changeset viewer.