Changeset 746 for trunk/src/compile.m


Ignore:
Timestamp:
Apr 20, 2014, 6:19:08 PM (10 years ago)
Author:
sommeria
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/compile.m

    r606 r746  
    88function compile (FctName,SubfctPath)
    99if isempty(which('mcc'))
    10     msgbox_uvmat('no Matlab compiler toolbox mcc installed')
     10    msgbox_uvmat('ERROR','no Matlab compiler toolbox mcc installed')
    1111    return
     12else
     13    hh=msgbox_uvmat('INFO',['compilation of ' FctName ' in progress...']);
    1214end
    1315disp(['compiling ' FctName ' ...'])
     
    2325end
    2426disp(['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'
     27try
     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'
     33catch ME
     34    msgbox_uvmat('ERROR',ME.message);
     35end
    3136display('** END **')
    32 end
     37delete(hh)
    3338
    3439
Note: See TracChangeset for help on using the changeset viewer.