# Build HTML documentation for macports OpenCV 2.4.6 on OS X

sudo port install opencv


As far as I can tell, no documentation was installed.

I know that I can access the HTML documentation online at http://docs.opencv.org/, and I know that I can download a PDF of the documentation from http://docs.opencv.org/opencv2refman.pdf‎, but what I really want is a local HTML version of the documentation because (a) I want an offline version that is fast and doesn't require Internet access and (b) having all the documentation in a flat PDF is confusing.

It seems very likely that I can build the documentation somehow in the Linux/Mac OpenCV 2.4.6 archive file that I downloaded from http://opencv.org/downloads.html, but I don't know how to do it. There is a doc/ folder in that archive file, but everything is written in .rst files that probably need to be compiled somehow.

Can anyone help me either with commands to compile the included documentation, or with a way to download an archive of the HTML documentation?

I saw this related question but it's unclear to me what the specific sequence of commands is to build the documentation from scratch.

I know sphinx is required from that question. My python version is 2.7:

$python --version Python 2.7.5$ which python
/usr/bin/python


And I installed sphinx for python 2.7 via the command:

sudo port install py27-sphinx


From the opencv-2.4.6.1/opencv-2.4.6.1 folder of the expanded opencv archive, I ran:

cmake -D BUILD_DOCS=YES -D CMAKE_BUILD_TYPE=RELEASE .


Among many other things in the output was:

--   Documentation:
--     Build Documentation:         NO
--     Sphinx:                      NO
--     PdfLaTeX compiler:           /usr/texbin/pdflatex


And running make html_docs from the same folder (opencv-2.4.6.1/opencv-2.4.6.1) didn't do anything

make html_docs
make: *** No rule to make target html_docs'.  Stop.
`