Skip to content
Snippets Groups Projects
Verified Commit 0e77815e authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

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

Closes #1630
parent 7527cb83
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
Subproject commit aad8414f94b30a3024bdb759897f100036bf3e95
Subproject commit 1393bf1d7e1e5db84e8b01a26f9d61196fe6662a
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment