mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #3194: Refer the $MAKE environment variable to determine `make
` command
This commit is contained in:
parent
a27bdd48a5
commit
26bf2d5fc0
1
CHANGES
1
CHANGES
@ -5,6 +5,7 @@ Features added
|
|||||||
--------------
|
--------------
|
||||||
|
|
||||||
* #3241: emit latex warning if buggy titlesec (ref #3210)
|
* #3241: emit latex warning if buggy titlesec (ref #3210)
|
||||||
|
* #3194: Refer the $MAKE environment variable to determine ``make`` command
|
||||||
|
|
||||||
Bugs fixed
|
Bugs fixed
|
||||||
----------
|
----------
|
||||||
|
@ -384,6 +384,15 @@ You can also give one or more filenames on the command line after the source and
|
|||||||
build directories. Sphinx will then try to build only these output files (and
|
build directories. Sphinx will then try to build only these output files (and
|
||||||
their dependencies).
|
their dependencies).
|
||||||
|
|
||||||
|
Environment variables
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
The :program:`sphinx-build` refers following environment variables:
|
||||||
|
|
||||||
|
.. desribe:: MAKE
|
||||||
|
|
||||||
|
A path to make command. A command name is also allowed.
|
||||||
|
:program:`sphinx-build` uses it to invoke sub-build process on make-mode.
|
||||||
|
|
||||||
Makefile options
|
Makefile options
|
||||||
----------------
|
----------------
|
||||||
|
@ -62,6 +62,7 @@ class Make(object):
|
|||||||
self.srcdir = srcdir
|
self.srcdir = srcdir
|
||||||
self.builddir = builddir
|
self.builddir = builddir
|
||||||
self.opts = opts
|
self.opts = opts
|
||||||
|
self.makecmd = os.environ.get('MAKE', 'make') # refer $MAKE to determine make command
|
||||||
|
|
||||||
def builddir_join(self, *comps):
|
def builddir_join(self, *comps):
|
||||||
return path.join(self.builddir, *comps)
|
return path.join(self.builddir, *comps)
|
||||||
@ -162,13 +163,13 @@ class Make(object):
|
|||||||
if self.run_generic_build('latex') > 0:
|
if self.run_generic_build('latex') > 0:
|
||||||
return 1
|
return 1
|
||||||
with cd(self.builddir_join('latex')):
|
with cd(self.builddir_join('latex')):
|
||||||
os.system('make all-pdf')
|
os.system('%s all-pdf' % self.makecmd)
|
||||||
|
|
||||||
def build_latexpdfja(self):
|
def build_latexpdfja(self):
|
||||||
if self.run_generic_build('latex') > 0:
|
if self.run_generic_build('latex') > 0:
|
||||||
return 1
|
return 1
|
||||||
with cd(self.builddir_join('latex')):
|
with cd(self.builddir_join('latex')):
|
||||||
os.system('make all-pdf-ja')
|
os.system('%s all-pdf-ja' % self.makecmd)
|
||||||
|
|
||||||
def build_text(self):
|
def build_text(self):
|
||||||
if self.run_generic_build('text') > 0:
|
if self.run_generic_build('text') > 0:
|
||||||
@ -189,7 +190,7 @@ class Make(object):
|
|||||||
if self.run_generic_build('texinfo') > 0:
|
if self.run_generic_build('texinfo') > 0:
|
||||||
return 1
|
return 1
|
||||||
with cd(self.builddir_join('texinfo')):
|
with cd(self.builddir_join('texinfo')):
|
||||||
os.system('make info')
|
os.system('%s info' % self.makecmd)
|
||||||
|
|
||||||
def build_gettext(self):
|
def build_gettext(self):
|
||||||
dtdir = self.builddir_join('gettext', '.doctrees')
|
dtdir = self.builddir_join('gettext', '.doctrees')
|
||||||
|
Loading…
Reference in New Issue
Block a user