Merge branch '64-bit-preprocessor', closes #862

time-shift
Houtan Bastani 2015-03-27 17:32:01 +01:00
commit e257787cc5
3 changed files with 24 additions and 5 deletions

3
.gitignore vendored
View File

@ -113,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

View File

@ -16,7 +16,7 @@ function dynare(fname, varargin)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2001-2014 Dynare Team
% Copyright (C) 2001-2015 Dynare Team
%
% This file is part of Dynare.
%
@ -145,7 +145,21 @@ if exist(fname(1:end-4),'dir') && exist([fname(1:end-4) filesep 'hooks'],'dir')
run([fname(1:end-4) filesep 'hooks/priorprocessing'])
end
command = ['"' dynareroot 'dynare_m" ' fname] ;
if ispc
[junk, arch] = getenv('PROCESSOR_ARCHITECTURE');
else
[junk, arch] = system('uname -m');
end
if isempty(strfind(arch, '64'))
arch_ext = '32';
disp('Using 32-bit preprocessor');
else
arch_ext = '64';
disp('Using 64-bit preprocessor');
end
command = ['"' dynareroot 'preprocessor' arch_ext filesep 'dynare_m" ' fname] ;
for i=2:nargin
command = [command ' ' varargin{i-1}];
end

View File

@ -69,7 +69,13 @@ DynareBison.cc DynareBison.hh location.hh stack.hh position.hh: DynareBison.yy
$(YACC) -o DynareBison.cc DynareBison.yy
all-local:
cd ../matlab && $(LN_S) -f $(abs_srcdir)/$(PROGRAMS) $(PROGRAMS)
if [ -z "`file $(PROGRAMS) | grep x86.64`" ]; then \
ARCH="32"; \
else \
ARCH="64"; \
fi; \
mkdir -p ../matlab/preprocessor$$ARCH ; \
cd ../matlab/preprocessor$$ARCH && $(LN_S) -f $(abs_srcdir)/$(PROGRAMS) $(PROGRAMS)
if HAVE_DOXYGEN
html-local: