Skip to content

Commit 5833546

Browse files
authored
Merge pull request #9963 from abhinavarora/ADD_MOBILE_SPHINX_BUILD
Add sphinx documentation for Mobile
2 parents 3b6d678 + 8db220d commit 5833546

File tree

4 files changed

+74
-1
lines changed

4 files changed

+74
-1
lines changed

doc/CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ add_custom_target(paddle_apis ALL
33

44
add_custom_target(paddle_docs ALL
55
DEPENDS paddle_v2_docs paddle_v2_docs_cn
6-
paddle_fluid_docs paddle_fluid_docs_cn)
6+
paddle_fluid_docs paddle_fluid_docs_cn
7+
paddle_mobile_docs paddle_mobile_docs_cn)
78

89
add_subdirectory(v2)
910
add_subdirectory(fluid)
11+
add_subdirectory(mobile)

doc/mobile/CMakeLists.txt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
if(NOT DEFINED SPHINX_THEME)
2+
set(SPHINX_THEME default)
3+
endif()
4+
5+
if(NOT DEFINED SPHINX_THEME_DIR)
6+
set(SPHINX_THEME_DIR)
7+
endif()
8+
9+
# configured documentation tools and intermediate build results
10+
set(BINARY_BUILD_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_build")
11+
12+
# Sphinx cache with pickled ReST documents
13+
set(SPHINX_CACHE_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/_doctrees")
14+
15+
# HTML output director
16+
set(SPHINX_HTML_DIR_EN "${CMAKE_CURRENT_BINARY_DIR}/en/html")
17+
18+
configure_file(
19+
"${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.en.in"
20+
"${BINARY_BUILD_DIR_EN}/conf.py"
21+
@ONLY)
22+
23+
sphinx_add_target(paddle_mobile_docs
24+
html
25+
${BINARY_BUILD_DIR_EN}
26+
${SPHINX_CACHE_DIR_EN}
27+
${CMAKE_CURRENT_SOURCE_DIR}
28+
${SPHINX_HTML_DIR_EN})
29+
30+
add_dependencies(paddle_mobile_docs gen_proto_py paddle_python)
31+
32+
# configured documentation tools and intermediate build results
33+
set(BINARY_BUILD_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_build")
34+
35+
# Sphinx cache with pickled ReST documents
36+
set(SPHINX_CACHE_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_doctrees")
37+
38+
# HTML output director
39+
set(SPHINX_HTML_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/html")
40+
41+
configure_file(
42+
"${CMAKE_CURRENT_SOURCE_DIR}/../templates/conf.py.cn.in"
43+
"${BINARY_BUILD_DIR_CN}/conf.py"
44+
@ONLY)
45+
46+
sphinx_add_target(paddle_mobile_docs_cn
47+
html
48+
${BINARY_BUILD_DIR_CN}
49+
${SPHINX_CACHE_DIR_CN}
50+
${CMAKE_CURRENT_SOURCE_DIR}
51+
${SPHINX_HTML_DIR_CN})
52+
53+
add_dependencies(paddle_mobile_docs_cn gen_proto_py paddle_python)

doc/mobile/index_cn.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
移动端
2+
=====
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
cross_compiling_for_android_cn.md
8+
cross_compiling_for_ios_cn.md
9+
cross_compiling_for_raspberry_cn.md

doc/mobile/index_en.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Mobile
2+
======
3+
4+
.. toctree::
5+
:maxdepth: 1
6+
7+
cross_compiling_for_android_en.md
8+
cross_compiling_for_ios_en.md
9+
cross_compiling_for_raspberry_en.md

0 commit comments

Comments
 (0)