Fix documentation build

* Doxygen needs `RECURSIVE = YES` in order to parse the `detail` subdir.

* The `-W` warnings-as-errors option for sphinx doesn't work with the
  makefile build. Switched to calling sphinx directly.

* Fix "citation [cppimport] is not referenced" warning.
diff --git a/docs/Doxyfile b/docs/Doxyfile
index 4dc8bf0..1b9d129 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -1,5 +1,6 @@
 PROJECT_NAME           = pybind11
 INPUT                  = ../include/pybind11/
+RECURSIVE              = YES
 
 GENERATE_HTML          = NO
 GENERATE_LATEX         = NO
diff --git a/docs/compiling.rst b/docs/compiling.rst
index 90b3829..67bd75c 100644
--- a/docs/compiling.rst
+++ b/docs/compiling.rst
@@ -14,10 +14,10 @@
 Building with cppimport
 ========================
 
- cppimport is a small Python import hook that determines whether there is a C++
- source file whose name matches the requested module. If there is, the file is
- compiled as a Python extension using pybind11 and placed in the same folder as
- the C++ source file. Python is then able to find the module and load it.
+[cppimport]_ is a small Python import hook that determines whether there is a C++
+source file whose name matches the requested module. If there is, the file is
+compiled as a Python extension using pybind11 and placed in the same folder as
+the C++ source file. Python is then able to find the module and load it.
 
 .. [cppimport] https://github.com/tbenthompson/cppimport
 
diff --git a/docs/conf.py b/docs/conf.py
index 9f29304..81ff26e 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -314,13 +314,13 @@
 
 
 def generate_doxygen_xml(app):
-    build_dir = '.build'
+    build_dir = os.path.join(app.confdir, '.build')
     if not os.path.exists(build_dir):
         os.mkdir(build_dir)
 
     try:
         subprocess.call(['doxygen', '--version'])
-        retcode = subprocess.call(['doxygen'])
+        retcode = subprocess.call(['doxygen'], cwd=app.confdir)
         if retcode < 0:
             sys.stderr.write("doxygen error code: {}\n".format(-retcode))
     except OSError as e: