Commits

Anonymous committed a58375e

Only create the index in the HTML builder.

Comments (0)

Files changed (1)

sphinx/builder.py

     Builds target formats from the reST sources.
     """
 
+    # builder's name, for the -b command line options
+    name = ''
+
     def __init__(self, app, env=None, freshenv=False):
         self.srcdir = app.srcdir
         self.outdir = app.outdir
                 docnames.add(tocdocname)
         docnames.add(self.config.master_doc)
 
-        self.info(bold('creating index...'))
-        self.env.create_index(self)
         self.prepare_writing(docnames)
 
         # write target files
 
     def prepare_writing(self, docnames):
         from sphinx.search import IndexBuilder
+
+        self.info(bold('creating index...'))
+        self.env.create_index(self)
+
         self.indexer = IndexBuilder()
         self.load_indexer(docnames)
         self.docwriter = HTMLWriter(self)