[Pkg-octave-commit] [SCM] dynare branch, master, updated. 304ca1e6661520b1ae552a2a989b90bd5c477272
Vincent Crevot
vincent.crevot at nodalink.com
Mon Feb 21 16:21:26 UTC 2011
The following commit has been merged in the master branch:
commit 49958686e8d562e76088c73d89e377328bd5b264
Author: Vincent Crevot <vincent.crevot at nodalink.com>
Date: Mon Feb 21 13:54:53 2011 +0100
Use new MEX build system
diff --git a/debian/changelog b/debian/changelog
index 02cf988..6086cbf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -23,6 +23,8 @@ dynare (4.2.0-1) UNRELEASED; urgency=low
Install info doc.
* debian/dynare-matlab.install:
Install MEX build system files.
+ * debian/dynare-matlab.postinst:
+ Use new MEX build system.
-- Vincent Crevot <vincent.crevot at nodalink.com> Wed, 16 Feb 2011 04:51:03 +0100
diff --git a/debian/dynare-matlab.postinst b/debian/dynare-matlab.postinst
index 9246dee..aed8bdf 100644
--- a/debian/dynare-matlab.postinst
+++ b/debian/dynare-matlab.postinst
@@ -30,24 +30,29 @@ then
done
fi
-# Build the MEX files
-
-mkdir -p /usr/lib/dynare/mex/matlab
+# Get MATLAB version
db_get dynare-matlab/matlab-user
MATLAB_USER=$RET
-cd /usr/src/dynare-matlab/mex/sources
-
-if [ -z "$MATLAB_USER" ]
+if [ -n "$MATLAB_USER" ]
then
- $MATLAB -nodisplay -r build_matlab
-else
db_input critical dynare-matlab/license-manager || true
db_go || true
- chown -R $MATLAB_USER /usr/lib/dynare/mex/matlab
- sudo -H -u $MATLAB_USER $MATLAB -nodisplay -r build_matlab
- chown -R root:root /usr/lib/dynare/mex/matlab
+ MATLAB="sudo -H -u $MATLAB_USER $MATLAB"
fi
+MATLAB_VERSION=$(echo 'version'|$MATLAB -nodisplay|egrep '^[0-9]')
+export MATLAB_VERSION
+
+# Build the MEX files
+
+cd /usr/src/dynare-matlab/mex/build/matlab
+./configure --with-matlab=$MATLAB_PATH
+make
+mkdir -p /usr/lib/dynare/mex/matlab
+install -m644 /usr/src/dynare-matlab/mex/matlab/* /usr/lib/dynare/mex/matlab
+make distclean
+rmdir /usr/src/dynare-matlab/mex/matlab
+
#DEBHELPER#
--
dynare
More information about the Pkg-octave-commit
mailing list