Changeset 895 for trunk/src/compile.m


Ignore:
Timestamp:
May 20, 2015, 11:21:25 AM (9 years ago)
Author:
sommeria
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/compile.m

    r830 r895  
    4343    SubfctPath=['-I ' SubfctPath];%string indicating the option of including the path SubfctPath
    4444end
    45 
     45hver=ver('MATLAB');
     46FctNameVersion=[FctName '_MCRROOT' regexprep(hver.Version,'\.','')];%suppress the dot in version number
    4647try
    4748    disp(['mcc -m -R -nojvm -R -nodisplay -R -singleCompThread ' SubfctPath ' ' FctName '.m'])
    4849    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]
    4950    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']
    5152    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'
    5354catch ME
    5455    hh=msgbox_uvmat('ERROR',ME.message);
Note: See TracChangeset for help on using the changeset viewer.