Options list at the top of the mod-file now parsed by the preprocessor

Closes #1630
time-shift
Sébastien Villemot 2018-12-19 16:15:48 +01:00
parent 7527cb8391
commit 0e77815ece
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
2 changed files with 1 additions and 20 deletions

View File

@ -207,25 +207,6 @@ else
end
end
% Read options from the first line in mod/dyn file.
fid = fopen(fname, 'r');
firstline = fgetl(fid);
fclose(fid);
if regexp(firstline, '\s*\/\/', 'once') == 1
firstline = regexprep(firstline, '\s*\/\/', '');
if ~isempty(regexp(firstline, '(^\s*\-\-\+\s*options:\s*)', 'once')) ...
&& ~isempty(regexp(firstline, '(\s*\+\-\-.*$)', 'once'))
firstline = regexprep(firstline, '(^\s*\-\-\+\s*options:\s*)', '');
firstline = regexprep(firstline, '(\s*\+\-\-.*$)', '');
dynoption = strsplit(firstline, {' ', ','});
if isequal(nargin, 1)
varargin = dynoption;
else
varargin = union(varargin, dynoption);
end
end
end
command = ['"' dynareroot 'preprocessor' arch_ext filesep 'dynare_m" ' fname] ;
command = [ command ' mexext=' mexext ' "matlabroot=' matlabroot '"'];
for i=1:length(varargin)

@ -1 +1 @@
Subproject commit aad8414f94b30a3024bdb759897f100036bf3e95
Subproject commit 1393bf1d7e1e5db84e8b01a26f9d61196fe6662a