diff --git a/.gitignore b/.gitignore index 367fb3503..ff09453b7 100644 --- a/.gitignore +++ b/.gitignore @@ -97,8 +97,6 @@ mex/build/matlab/run_m2html.m # Preprocessor /preprocessor/dynare_m /preprocessor/dynare_m.exe -/preprocessor/dynare_m64 -/preprocessor/dynare_m64.exe /preprocessor/DynareBison.cc /preprocessor/DynareBison.hh /preprocessor/FlexLexer.h @@ -115,8 +113,7 @@ mex/build/matlab/run_m2html.m /preprocessor/doc/ # MATLAB dir -/matlab/dynare_m -/matlab/dynare_m.exe +/matlab/preprocessor* /matlab/dynare_version.m # DLL rules diff --git a/matlab/dynare.m b/matlab/dynare.m index 299b073e9..9cdf8bf37 100644 --- a/matlab/dynare.m +++ b/matlab/dynare.m @@ -152,14 +152,14 @@ else end if isempty(strfind(arch, '64')) - arch_ext64 = ''; + arch_ext = '32'; disp('Using 32-bit preprocessor'); else - arch_ext64 = '64'; + arch_ext = '64'; disp('Using 64-bit preprocessor'); end -command = ['"' dynareroot 'dynare_m' arch_ext64 '" ' fname] ; +command = ['"' dynareroot 'preprocessor' arch_ext filesep 'dynare_m" ' fname] ; for i=2:nargin command = [command ' ' varargin{i-1}]; end diff --git a/preprocessor/Makefile.am b/preprocessor/Makefile.am index bce3bbe68..804282738 100644 --- a/preprocessor/Makefile.am +++ b/preprocessor/Makefile.am @@ -70,11 +70,12 @@ DynareBison.cc DynareBison.hh location.hh stack.hh position.hh: DynareBison.yy all-local: if [ -z "`file $(PROGRAMS) | grep x86.64`" ]; then \ - ARCH=""; \ + ARCH="32"; \ else \ ARCH="64"; \ fi; \ - cd ../matlab && $(LN_S) -f $(abs_srcdir)/$(PROGRAMS) $(PROGRAMS)$$ARCH + mkdir -p ../matlab/preprocessor$$ARCH ; \ + cd ../matlab/preprocessor$$ARCH && $(LN_S) -f $(abs_srcdir)/$(PROGRAMS) $(PROGRAMS) if HAVE_DOXYGEN html-local: