Skip to content

Commit

Permalink
use more portable output handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Qianqian Fang committed Apr 4, 2020
1 parent 66b8f4f commit c986ab7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/buildmmc.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function buildmmc(varargin)
linkflags=[linkflags ' ' opt.lib];
end
fn=dir('*.o');
fprintf('mex %s -output %s -outdir ../%slab %s=''%s'' \n',strjoin({fn.name}),pname,pname,linkvar,linkflags);
fprintf(1, 'mex %s -output %s -outdir ../%slab %s=''%s''\n',strjoin({fn.name}),pname,pname,linkvar,linkflags);
eval(sprintf('mex %s -output %s -outdir ../%slab %s=''%s'' ',strjoin({fn.name}),pname,pname,linkvar,linkflags));
else
linkflags=regexprep(linkflags,['[\\]*\$' linkvar],'');
Expand All @@ -109,7 +109,7 @@ function buildmmc(varargin)
end
fn=dir('*.o');
cmd=sprintf('mex %s -o ../%slab/%s %s ',strjoin({fn.name}),pname,pname,linkflags);
fprintf(stdout,'%s\n',cmd);
fflush(stdout);
fprintf(1,'%s\n',cmd);
fflush(1);
eval(cmd);
end

0 comments on commit c986ab7

Please sign in to comment.