| 1 |
function cleanFiles(cleanBefore) |
| 2 |
% clean output files in ./tex using make |
| 3 |
%FIXME: this file appears to be unused (but it is useful) |
| 4 |
%FIXME: adapt this file to take the output directory into account |
| 5 |
if cleanBefore && exist(fullfile('tex','Makefile'),'file') |
| 6 |
fprintf(1, 'Cleaning output files...\n'); |
| 7 |
cwd = pwd; |
| 8 |
try |
| 9 |
cd('tex'); |
| 10 |
[exitCode, output] = system('make distclean'); |
| 11 |
fprintf(1,'%s\n', output); |
| 12 |
assert(exitCode==0, 'Exit code 0 means correct execution'); |
| 13 |
catch |
| 14 |
% This might happen when make is not present |
| 15 |
fprintf(2, '\tNot completed succesfully\n\n'); |
| 16 |
end |
| 17 |
cd(cwd); |
| 18 |
end |
| 19 |
end |