summaryrefslogtreecommitdiff
path: root/sphinx/make_mode.py
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2017-12-28 20:45:02 +0000
committerStephen Finucane <stephen@that.guru>2018-01-11 20:57:03 +0000
commita83e8bab7d03d209f76cc92ffe29a9b89289cf6f (patch)
tree23bd2051c8cc805ca1f8e3568014237c4edf8dae /sphinx/make_mode.py
parentb1cea0258924840f8611e0301303fd18bcac82b0 (diff)
downloadsphinx-git-a83e8bab7d03d209f76cc92ffe29a9b89289cf6f.tar.gz
builders: Add 'Builder.epilog' option
This allows builders to emit a final epilog message containing information such as where resulting files can be found. This is only emitted if the build was successful. This allows us to remove this content from the 'make_mode' tool and the legacy 'Makefile' and 'make.bat' templates. There's room for more dramatic simplification of the former, but this will come later. Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'sphinx/make_mode.py')
-rw-r--r--sphinx/make_mode.py61
1 files changed, 0 insertions, 61 deletions
diff --git a/sphinx/make_mode.py b/sphinx/make_mode.py
index 0bc1a797d..64268c2ec 100644
--- a/sphinx/make_mode.py
+++ b/sphinx/make_mode.py
@@ -101,95 +101,60 @@ class Make(object):
# type: () -> int
if self.run_generic_build('html') > 0:
return 1
- print()
- print('Build finished. The HTML pages are in %s.' % self.builddir_join('html'))
return 0
def build_dirhtml(self):
# type: () -> int
if self.run_generic_build('dirhtml') > 0:
return 1
- print()
- print('Build finished. The HTML pages are in %s.' %
- self.builddir_join('dirhtml'))
return 0
def build_singlehtml(self):
# type: () -> int
if self.run_generic_build('singlehtml') > 0:
return 1
- print()
- print('Build finished. The HTML page is in %s.' %
- self.builddir_join('singlehtml'))
return 0
def build_pickle(self):
# type: () -> int
if self.run_generic_build('pickle') > 0:
return 1
- print()
- print('Build finished; now you can process the pickle files.')
return 0
def build_json(self):
# type: () -> int
if self.run_generic_build('json') > 0:
return 1
- print()
- print('Build finished; now you can process the JSON files.')
return 0
def build_htmlhelp(self):
# type: () -> int
if self.run_generic_build('htmlhelp') > 0:
return 1
- print()
- print('Build finished; now you can run HTML Help Workshop with the '
- '.hhp project file in %s.' % self.builddir_join('htmlhelp'))
return 0
def build_qthelp(self):
# type: () -> int
if self.run_generic_build('qthelp') > 0:
return 1
- print()
- print('Build finished; now you can run "qcollectiongenerator" with the '
- '.qhcp project file in %s, like this:' % self.builddir_join('qthelp'))
- print('$ qcollectiongenerator %s.qhcp' % self.builddir_join('qthelp', proj_name))
- print('To view the help file:')
- print('$ assistant -collectionFile %s.qhc' %
- self.builddir_join('qthelp', proj_name))
return 0
def build_devhelp(self):
# type: () -> int
if self.run_generic_build('devhelp') > 0:
return 1
- print()
- print("Build finished.")
- print("To view the help file:")
- print("$ mkdir -p $HOME/.local/share/devhelp/" + proj_name)
- print("$ ln -s %s $HOME/.local/share/devhelp/%s" %
- (self.builddir_join('devhelp'), proj_name))
- print("$ devhelp")
return 0
def build_epub(self):
# type: () -> int
if self.run_generic_build('epub') > 0:
return 1
- print()
- print('Build finished. The ePub file is in %s.' % self.builddir_join('epub'))
return 0
def build_latex(self):
# type: () -> int
if self.run_generic_build('latex') > 0:
return 1
- print("Build finished; the LaTeX files are in %s." % self.builddir_join('latex'))
- if os.name == 'posix':
- print("Run `make' in that directory to run these through (pdf)latex")
- print("(use `make latexpdf' here to do that automatically).")
return 0
def build_latexpdf(self):
@@ -210,19 +175,12 @@ class Make(object):
# type: () -> int
if self.run_generic_build('text') > 0:
return 1
- print()
- print('Build finished. The text files are in %s.' % self.builddir_join('text'))
return 0
def build_texinfo(self):
# type: () -> int
if self.run_generic_build('texinfo') > 0:
return 1
- print("Build finished; the Texinfo files are in %s." %
- self.builddir_join('texinfo'))
- if os.name == 'posix':
- print("Run `make' in that directory to run these through makeinfo")
- print("(use `make info' here to do that automatically).")
return 0
def build_info(self):
@@ -237,33 +195,22 @@ class Make(object):
dtdir = self.builddir_join('gettext', '.doctrees')
if self.run_generic_build('gettext', doctreedir=dtdir) > 0:
return 1
- print()
- print('Build finished. The message catalogs are in %s.' %
- self.builddir_join('gettext'))
return 0
def build_changes(self):
# type: () -> int
if self.run_generic_build('changes') > 0:
return 1
- print()
- print('Build finished. The overview file is in %s.' %
- self.builddir_join('changes'))
return 0
def build_linkcheck(self):
# type: () -> int
res = self.run_generic_build('linkcheck')
- print()
- print('Link check complete; look for any errors in the above output '
- 'or in %s.' % self.builddir_join('linkcheck', 'output.txt'))
return res
def build_doctest(self):
# type: () -> int
res = self.run_generic_build('doctest')
- print("Testing of doctests in the sources finished, look at the "
- "results in %s." % self.builddir_join('doctest', 'output.txt'))
return res
def build_coverage(self):
@@ -271,26 +218,18 @@ class Make(object):
if self.run_generic_build('coverage') > 0:
print("Has the coverage extension been enabled?")
return 1
- print()
- print("Testing of coverage in the sources finished, look at the "
- "results in %s." % self.builddir_join('coverage'))
return 0
def build_xml(self):
# type: () -> int
if self.run_generic_build('xml') > 0:
return 1
- print()
- print('Build finished. The XML files are in %s.' % self.builddir_join('xml'))
return 0
def build_pseudoxml(self):
# type: () -> int
if self.run_generic_build('pseudoxml') > 0:
return 1
- print()
- print('Build finished. The pseudo-XML files are in %s.' %
- self.builddir_join('pseudoxml'))
return 0
def run_generic_build(self, builder, doctreedir=None):