Skip to content

Commit 69350ea

Browse files
committed
Implemented review comments to zh_CN version of eclipse setup and PICO-KIT get started guides. Resolved issues after rebasing on master of several commits.
1 parent c054b1f commit 69350ea

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

docs/zh_CN/conf.py

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,26 @@
2222
# documentation root, use os.path.abspath to make it absolute, like shown here.
2323
sys.path.insert(0, os.path.abspath('..'))
2424

25-
from repo_util import run_cmd_get_output
25+
from local_util import run_cmd_get_output, copy_if_modified
26+
27+
builddir = '_build'
28+
if 'BUILDDIR' in os.environ:
29+
builddir = os.environ['BUILDDIR']
2630

2731
# Call Doxygen to get XML files from the header files
2832
print "Calling Doxygen to generate latest XML files"
2933
os.system("doxygen ../Doxyfile")
34+
# Doxygen has generated XML files in 'xml' directory.
35+
# Copy them to 'xml_in', only touching the files which have changed.
36+
copy_if_modified('xml/', 'xml_in/')
37+
3038
# Generate 'api_name.inc' files using the XML files by Doxygen
31-
os.system("python ../gen-dxd.py")
39+
os.system('python ../gen-dxd.py')
40+
3241
# Generate 'kconfig.inc' file from components' Kconfig files
33-
os.system("python ../gen-kconfig-doc.py > _build/inc/kconfig.inc")
42+
kconfig_inc_path = '{}/inc/kconfig.inc'.format(builddir)
43+
os.system('python ../gen-kconfig-doc.py > ' + kconfig_inc_path + '.in')
44+
copy_if_modified(kconfig_inc_path + '.in', kconfig_inc_path)
3445

3546
# http://stackoverflow.com/questions/12772927/specifying-an-online-image-in-sphinx-restructuredtext-format
3647
#
@@ -63,7 +74,11 @@
6374
packetdiag_fontpath = '../_static/DejaVuSans.ttf'
6475

6576
# Breathe extension variables
66-
breathe_projects = { "esp32-idf": "xml/" }
77+
78+
# Doxygen regenerates files in 'xml/' directory every time,
79+
# but we copy files to 'xml_in/' only when they change, to speed up
80+
# incremental builds.
81+
breathe_projects = { "esp32-idf": "xml_in/" }
6782
breathe_default_project = "esp32-idf"
6883

6984
# Add any paths that contain templates here, relative to this directory.

0 commit comments

Comments
 (0)