...
mkdir /sw/opencv/opencv-3.0.0/build/doc
make -j2
make install
opencv-3.1.0
>>>>>>>>>>>>>>>>
cd /sw/opencv/opencv-3.1.0/build
cmake -D CMAKE_BUILD_TYPE=3.1.0 -D CMAKE_INSTALL_PREFIX=/sw/opencv/opencv-3.1.0 -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_QT=OFF -D WITH_OPENGL=ON ..
mkdir /sw/opencv/opencv-3.1.0/build/doc
make -j2
make install
>>>>>>>>>>>>>>>>>
Reference
1. http://docs.opencv.org/3.0-last-rst/doc/tutorials/introduction/linux_install/linux_install.html
...