From 9f9810cbb4942942a9ee5b2c65543cb4d78c1f55 Mon Sep 17 00:00:00 2001 From: weixing02 <564445201@qq.com> Date: Fri, 30 Mar 2018 16:05:19 +0800 Subject: [PATCH] Add dependencies --- doc/fluid/CMakeLists.txt | 4 ++++ doc/fluid/api/CMakeLists.txt | 2 ++ doc/v2/CMakeLists.txt | 4 ++++ doc/v2/api/CMakeLists.txt | 2 ++ paddle/scripts/docker/build.sh | 2 +- paddle/scripts/travis/build_doc.sh | 2 +- 6 files changed, 14 insertions(+), 2 deletions(-) diff --git a/doc/fluid/CMakeLists.txt b/doc/fluid/CMakeLists.txt index fbf654ada86..9fe79323ef9 100644 --- a/doc/fluid/CMakeLists.txt +++ b/doc/fluid/CMakeLists.txt @@ -27,6 +27,8 @@ sphinx_add_target(paddle_fluid_docs ${CMAKE_CURRENT_SOURCE_DIR} ${SPHINX_HTML_DIR_EN}) +add_dependencies(paddle_fluid_docs gen_proto_py) + # configured documentation tools and intermediate build results set(BINARY_BUILD_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_build") @@ -48,4 +50,6 @@ sphinx_add_target(paddle_fluid_docs_cn ${CMAKE_CURRENT_SOURCE_DIR} ${SPHINX_HTML_DIR_CN}) +add_dependencies(paddle_fluid_docs_cn gen_proto_py) + add_subdirectory(api) diff --git a/doc/fluid/api/CMakeLists.txt b/doc/fluid/api/CMakeLists.txt index 1627b963f38..ca40dfb9644 100644 --- a/doc/fluid/api/CMakeLists.txt +++ b/doc/fluid/api/CMakeLists.txt @@ -18,3 +18,5 @@ sphinx_add_target(paddle_fluid_apis ${SPHINX_CACHE_DIR_EN} ${CMAKE_CURRENT_SOURCE_DIR} ${SPHINX_HTML_DIR_EN}) + +add_dependencies(paddle_fluid_apis gen_proto_py framework_py_proto copy_paddle_pybind) diff --git a/doc/v2/CMakeLists.txt b/doc/v2/CMakeLists.txt index 48c9cf73277..82de7a3a3e1 100644 --- a/doc/v2/CMakeLists.txt +++ b/doc/v2/CMakeLists.txt @@ -27,6 +27,8 @@ sphinx_add_target(paddle_v2_docs ${CMAKE_CURRENT_SOURCE_DIR} ${SPHINX_HTML_DIR_EN}) +add_dependencies(paddle_v2_docs gen_proto_py) + # configured documentation tools and intermediate build results set(BINARY_BUILD_DIR_CN "${CMAKE_CURRENT_BINARY_DIR}/cn/_build") @@ -48,4 +50,6 @@ sphinx_add_target(paddle_v2_docs_cn ${CMAKE_CURRENT_SOURCE_DIR} ${SPHINX_HTML_DIR_CN}) +add_dependencies(paddle_v2_docs_cn gen_proto_py) + add_subdirectory(api) diff --git a/doc/v2/api/CMakeLists.txt b/doc/v2/api/CMakeLists.txt index a265a1b6f3a..da1eafc02ed 100644 --- a/doc/v2/api/CMakeLists.txt +++ b/doc/v2/api/CMakeLists.txt @@ -18,3 +18,5 @@ sphinx_add_target(paddle_v2_apis ${SPHINX_CACHE_DIR_EN} ${CMAKE_CURRENT_SOURCE_DIR} ${SPHINX_HTML_DIR_EN}) + +add_dependencies(paddle_v2_apis gen_proto_py framework_py_proto copy_paddle_pybind) diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh index 322f72e4a58..2309dc40cc2 100755 --- a/paddle/scripts/docker/build.sh +++ b/paddle/scripts/docker/build.sh @@ -125,7 +125,7 @@ EOF -DWITH_STYLE_CHECK=OFF make -j `nproc` gen_proto_py framework_py_proto make -j `nproc` copy_paddle_pybind - make -j `nproc` paddle_docs paddle_docs_cn paddle_api_docs + make -j `nproc` paddle_docs paddle_apis popd fi diff --git a/paddle/scripts/travis/build_doc.sh b/paddle/scripts/travis/build_doc.sh index 09496e4de13..eabcda95b82 100755 --- a/paddle/scripts/travis/build_doc.sh +++ b/paddle/scripts/travis/build_doc.sh @@ -9,7 +9,7 @@ cd $TRAVIS_BUILD_DIR/build cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_GPU=OFF -DWITH_MKL=OFF -DWITH_DOC=ON -DWITH_STYLE_CHECK=OFF make -j `nproc` gen_proto_py framework_py_proto make -j `nproc` copy_paddle_pybind -make -j `nproc` paddle_docs paddle_docs_cn paddle_api_docs paddle_fluid_api_docs +make -j `nproc` paddle_docs paddle_apis # check websites for broken links linkchecker doc/v2/en/html/index.html -- GitLab