Skip to content

Commit ab5211f

Browse files
ailelimli
authored andcommitted
[doc] minor fixs (apache#3067)
1 parent 13257ce commit ab5211f

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

docs/sphinx_util.py

+3-16
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
import docutils
66
import subprocess
77

8-
READTHEDOCS_BUILD = (os.environ.get('READTHEDOCS', None) is not None)
9-
108
def run_build_mxnet(folder):
119
"""Run the doxygen make command in the designated folder."""
1210
try:
13-
if READTHEDOCS_BUILD:
14-
subprocess.call('cd %s; cp make/readthedocs.mk config.mk' % folder, shell = True)
15-
subprocess.call('cd %s; rm -rf build' % folder, shell = True)
16-
retcode = subprocess.call("cd %s; make" % folder, shell = True)
11+
subprocess.call('cd %s; cp make/readthedocs.mk config.mk' % folder, shell = True)
12+
subprocess.call('cd %s; rm -rf build' % folder, shell = True)
13+
retcode = subprocess.call("cd %s; make -j$(nproc)" % folder, shell = True)
1714
if retcode < 0:
1815
sys.stderr.write("build terminated by signal %s" % (-retcode))
1916
except OSError as e:
@@ -25,19 +22,9 @@ def run_build_mxnet(folder):
2522
else:
2623
subprocess.call('cd ../recommonmark/; git pull', shell=True)
2724

28-
if not os.path.exists('web-data'):
29-
subprocess.call('rm -rf web-data;' +
30-
'git clone https://github.com/dmlc/web-data', shell = True)
31-
else:
32-
subprocess.call('cd web-data; git pull', shell=True)
33-
34-
3525
curr_path = os.path.dirname(os.path.abspath(os.path.expanduser(__file__)))
3626
root_path = os.path.join(curr_path, '..')
3727
run_build_mxnet(root_path)
38-
sys.stderr.write('READTHEDOCS=%s\n' % (READTHEDOCS_BUILD))
39-
40-
4128

4229
sys.path.insert(0, os.path.abspath('../recommonmark/'))
4330

make/readthedocs.mk

+3
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@ USE_S3 = 0
6464

6565
# path to libjvm.so
6666
LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server
67+
68+
# uses O0 instead of O3 for better performance
69+
DEBUG = 1

0 commit comments

Comments
 (0)