Added flag to install matlab tests into toolbox path

release/4.3a0
Alex Cunningham 2011-12-01 01:59:38 +00:00
parent 5ab3211ff3
commit 8bd894275a
2 changed files with 20 additions and 1 deletions

View File

@ -126,6 +126,17 @@ AC_ARG_ENABLE([build_toolbox],
AM_CONDITIONAL([ENABLE_BUILD_TOOLBOX], [test x$build_toolbox = xtrue])
# enable installation of matlab tests
AC_ARG_ENABLE([install_matlab_tests],
[ --enable-install-matlab-tests Enable installation of tests for the Matlab toolbox],
[case "${enableval}" in
yes) install_matlab_tests=true ;;
no) install_matlab_tests=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-install-matlab-tests]) ;;
esac],[install_matlab_tests=true])
AM_CONDITIONAL([ENABLE_INSTALL_MATLAB_TESTS], [test x$install_matlab_tests = xtrue])
# Matlab toolbox: optional flag to change location of toolbox, defaults to install prefix
AC_ARG_WITH([toolbox],
[AS_HELP_STRING([--with-toolbox],

View File

@ -57,9 +57,17 @@ all:
./wrap ${interfacePath} ${moduleName} ${toolboxpath} ${nameSpace} ${mexFlags}
# install the headers and matlab toolbox
if ENABLE_INSTALL_MATLAB_TESTS
install-exec-hook: all
install -d ${toolbox}/gtsam && \
cp -rf ../toolbox/* ${toolbox}/gtsam
cp -rf ../toolbox/* ${toolbox}/gtsam && \
mkdir -p ${toolbox}/gtsam/tests && \
cp -rf ../../tests/matlab/*.m ${toolbox}/gtsam/tests
else
install-exec-hook: all
install -d ${toolbox}/gtsam && \
cp -rf ../toolbox/* ${toolbox}/gtsam/tests
endif
# clean local toolbox dir
clean: