summaryrefslogtreecommitdiff
path: root/sphinx/make_mode.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-03-15 01:29:09 +0900
committerGitHub <noreply@github.com>2018-03-15 01:29:09 +0900
commit613657981bf2edfc1567499384b21f8e85c4e05d (patch)
tree50ab3b210f319705b13b15f1003fe3ae782b45db /sphinx/make_mode.py
parent7bc2d82da76fb97b0ed685b54baba2af68dba8e6 (diff)
parent24054d1862895b2d4aac4393ba75182d63b49369 (diff)
downloadsphinx-git-613657981bf2edfc1567499384b21f8e85c4e05d.tar.gz
Merge pull request #4718 from tk0miya/4716_make_not_found
Fix #4716: Generation PDF file with TexLive on Windows, file not found error
Diffstat (limited to 'sphinx/make_mode.py')
-rw-r--r--sphinx/make_mode.py24
1 files changed, 18 insertions, 6 deletions
diff --git a/sphinx/make_mode.py b/sphinx/make_mode.py
index 78df06107..aecad31b4 100644
--- a/sphinx/make_mode.py
+++ b/sphinx/make_mode.py
@@ -101,22 +101,34 @@ class Make(object):
# type: () -> int
if self.run_generic_build('latex') > 0:
return 1
- with cd(self.builddir_join('latex')):
- return subprocess.call([self.makecmd, 'all-pdf'])
+ try:
+ with cd(self.builddir_join('latex')):
+ return subprocess.call([self.makecmd, 'all-pdf'])
+ except OSError:
+ print('Error: Failed to run: %s' % self.makecmd)
+ return 1
def build_latexpdfja(self):
# type: () -> int
if self.run_generic_build('latex') > 0:
return 1
- with cd(self.builddir_join('latex')):
- return subprocess.call([self.makecmd, 'all-pdf-ja'])
+ try:
+ with cd(self.builddir_join('latex')):
+ return subprocess.call([self.makecmd, 'all-pdf-ja'])
+ except OSError:
+ print('Error: Failed to run: %s' % self.makecmd)
+ return 1
def build_info(self):
# type: () -> int
if self.run_generic_build('texinfo') > 0:
return 1
- with cd(self.builddir_join('texinfo')):
- return subprocess.call([self.makecmd, 'info'])
+ try:
+ with cd(self.builddir_join('texinfo')):
+ return subprocess.call([self.makecmd, 'info'])
+ except OSError:
+ print('Error: Failed to run: %s' % self.makecmd)
+ return 1
def build_gettext(self):
# type: () -> int