From d465c8e37d5c86a78464fa11e77c0d8105e3b407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Fri, 24 Sep 2021 15:44:14 +0200 Subject: [PATCH] Provisions for MATLAB R2021b (cherry picked from commit 6669e55b97b8f3884da81024521fed5fca8d72fe) --- m4/ax_matlab_version.m4 | 3 +++ macOS/build.sh | 4 ++-- matlab/add_path_to_mex_files.m | 4 ++-- windows/build.sh | 4 ++-- windows/dynare.nsi | 6 +++--- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/m4/ax_matlab_version.m4 b/m4/ax_matlab_version.m4 index 834589f0f5..5cd35cb984 100644 --- a/m4/ax_matlab_version.m4 +++ b/m4/ax_matlab_version.m4 @@ -44,6 +44,9 @@ fi if test -n "$MATLAB_VERSION"; then dnl Convert a release number (Rnnnnx) into a version number (x.y) case $MATLAB_VERSION in + *2021b | *2021B) + MATLAB_VERSION="9.11" + ;; *2021a | *2021A) MATLAB_VERSION="9.10" ;; diff --git a/macOS/build.sh b/macOS/build.sh index 2c0f7b7851..518dc9aec9 100755 --- a/macOS/build.sh +++ b/macOS/build.sh @@ -112,7 +112,7 @@ PKGFILES="$ROOTDIR"/macOS/pkg/"$NAME" mkdir -p \ "$PKGFILES"/preprocessor \ "$PKGFILES"/mex/matlab/maci64-8.3-9.3 \ - "$PKGFILES"/mex/matlab/maci64-9.4-9.10 \ + "$PKGFILES"/mex/matlab/maci64-9.4-9.11 \ "$PKGFILES"/doc/dynare++ \ "$PKGFILES"/dynare++ \ "$PKGFILES"/scripts \ @@ -176,7 +176,7 @@ make clean --with-slicot="$LIB64"/Slicot/with-underscore \ --with-matlab=/Applications/MATLAB_R2019b.app make -j"$NTHREADS" -cp -L "$ROOTDIR"/mex/matlab/* "$PKGFILES"/mex/matlab/maci64-9.4-9.10 +cp -L "$ROOTDIR"/mex/matlab/* "$PKGFILES"/mex/matlab/maci64-9.4-9.11 ## diff --git a/matlab/add_path_to_mex_files.m b/matlab/add_path_to_mex_files.m index c16e1a840d..73a24673d6 100644 --- a/matlab/add_path_to_mex_files.m +++ b/matlab/add_path_to_mex_files.m @@ -60,7 +60,7 @@ else end end else - tmp = [dynareroot '../mex/matlab/win64-9.4-9.10/']; + tmp = [dynareroot '../mex/matlab/win64-9.4-9.11/']; if exist(tmp, 'dir') mexpath = tmp; if modifypath @@ -80,7 +80,7 @@ else end end else - tmp = [dynareroot '../mex/matlab/maci64-9.4-9.10']; + tmp = [dynareroot '../mex/matlab/maci64-9.4-9.11']; if exist(tmp, 'dir') mexpath = tmp; if modifypath diff --git a/windows/build.sh b/windows/build.sh index 07a7af5a0a..959f8aef60 100755 --- a/windows/build.sh +++ b/windows/build.sh @@ -121,8 +121,8 @@ build_windows_matlab_mex_64_b () PACKAGE_STRING="dynare $VERSION" make -j"$NTHREADS" all x86_64-w64-mingw32-strip -- **/*.mexw64 - mkdir -p "$ROOT_DIRECTORY"/../mex/matlab/win64-9.4-9.10 - mv -- **/*.mexw64 "$ROOT_DIRECTORY"/../mex/matlab/win64-9.4-9.10 + mkdir -p "$ROOT_DIRECTORY"/../mex/matlab/win64-9.4-9.11 + mv -- **/*.mexw64 "$ROOT_DIRECTORY"/../mex/matlab/win64-9.4-9.11 } # Create Windows DLL binaries for Octave/MinGW (64bit) diff --git a/windows/dynare.nsi b/windows/dynare.nsi index 5e15a9fc4b..c85a3064ab 100644 --- a/windows/dynare.nsi +++ b/windows/dynare.nsi @@ -90,9 +90,9 @@ Section "MEX files for MATLAB 64-bit, version 8.3 to 9.3 (R2014a to R2017b)" File ..\mex\matlab\win64-8.3-9.3\*.mexw64 SectionEnd -Section "MEX files for MATLAB 64-bit, version 9.4 to 9.10 (R2018a to R2021a)" - SetOutPath $INSTDIR\mex\matlab\win64-9.4-9.10 - File ..\mex\matlab\win64-9.4-9.10\*.mexw64 +Section "MEX files for MATLAB 64-bit, version 9.4 to 9.10 (R2018a to R2021b)" + SetOutPath $INSTDIR\mex\matlab\win64-9.4-9.11 + File ..\mex\matlab\win64-9.4-9.11\*.mexw64 SectionEnd Section "MinGW compiler for MATLAB 64-bit" -- GitLab