You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2016/07/26 00:39:59 UTC

incubator-kudu git commit: [make_site.sh] an option for the script: doxygen

Repository: incubator-kudu
Updated Branches:
  refs/heads/master 81b2d9a7c -> 96c096010


[make_site.sh] an option for the script: doxygen

By default, do not build the doxygen docs for the site.
Building auto-generated doxygen docs requires the 'doxygen' tool
to be present at build machines, which is not the case right now.

To build doxygen docs, add 'doxygen' option when running the script.
The latter happens automatically for the 'site' target
when the doxygen package is present at the build machine.

Change-Id: I23394d4339b9afb696335d9795f11d8029999ff9
Reviewed-on: http://gerrit.cloudera.org:8080/3766
Tested-by: Kudu Jenkins
Reviewed-by: Mike Percy <mp...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/incubator-kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-kudu/commit/96c09601
Tree: http://git-wip-us.apache.org/repos/asf/incubator-kudu/tree/96c09601
Diff: http://git-wip-us.apache.org/repos/asf/incubator-kudu/diff/96c09601

Branch: refs/heads/master
Commit: 96c096010ffe945b58aa722bb0a01149f157a15a
Parents: 81b2d9a
Author: Alexey Serbin <as...@cloudera.com>
Authored: Mon Jul 25 16:08:14 2016 -0700
Committer: Mike Percy <mp...@apache.org>
Committed: Tue Jul 26 00:39:41 2016 +0000

----------------------------------------------------------------------
 CMakeLists.txt                    | 24 ++++++++++++++++--------
 docs/support/scripts/make_site.sh | 31 ++++++++++++++++++++++++++-----
 2 files changed, 42 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/96c09601/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e924c2f..e4db18a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -964,14 +964,6 @@ if (UNIX)
 endif (UNIX)
 
 ############################################################
-# "make site" target
-############################################################
-if (UNIX)
-  add_custom_target(site
-    ${CMAKE_CURRENT_SOURCE_DIR}/docs/support/scripts/make_site.sh)
-endif (UNIX)
-
-############################################################
 # "make doxygen" target
 # Needs the doxygen system package to work.
 ############################################################
@@ -1004,6 +996,22 @@ if (UNIX)
 endif (UNIX)
 
 ############################################################
+# "make site" target
+#
+# NOTE: It's supposed find_package(Doxygen) has already
+# been run at this point.
+############################################################
+if (UNIX)
+  if (NOT DOXYGEN_FOUND)
+    add_custom_target(site
+      ${CMAKE_CURRENT_SOURCE_DIR}/docs/support/scripts/make_site.sh)
+  else ()
+    add_custom_target(site
+      ${CMAKE_CURRENT_SOURCE_DIR}/docs/support/scripts/make_site.sh doxygen)
+  endif ()
+endif (UNIX)
+
+############################################################
 # Subdirectories
 ############################################################
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/96c09601/docs/support/scripts/make_site.sh
----------------------------------------------------------------------
diff --git a/docs/support/scripts/make_site.sh b/docs/support/scripts/make_site.sh
index b786fbf..0960682 100755
--- a/docs/support/scripts/make_site.sh
+++ b/docs/support/scripts/make_site.sh
@@ -28,6 +28,16 @@ BUILD_TYPE=release
 SOURCE_ROOT=$(cd $(dirname $0)/../../..; pwd)
 BUILD_ROOT="$SOURCE_ROOT/build/$BUILD_TYPE"
 SITE_OUTPUT_DIR="$BUILD_ROOT/site"
+
+if [ $# -gt 0 ]; then
+  for arg in $*; do
+    case $arg in
+      "doxygen")  OPT_DOXYGEN=1 ;;
+      *)          echo "unknown option: $arg"; exit 1 ;;
+    esac
+  done
+fi
+
 set -x
 
 cd "$SOURCE_ROOT"
@@ -45,7 +55,11 @@ $SOURCE_ROOT/build-support/enable_devtoolset.sh \
     -DNO_TESTS=1 \
     -DCMAKE_BUILD_TYPE=$BUILD_TYPE \
     $SOURCE_ROOT
-make -j$(getconf _NPROCESSORS_ONLN) all doxygen
+if [ -n "$OPT_DOXYGEN" ]; then
+  make -j$(getconf _NPROCESSORS_ONLN) all doxygen
+else
+  make -j$(getconf _NPROCESSORS_ONLN)
+fi
 
 # Check out the gh-pages repo into $SITE_OUTPUT_DIR
 git clone -q $(git config --get remote.origin.url) --reference $SOURCE_ROOT -b gh-pages --depth 1 "$SITE_OUTPUT_DIR"
@@ -77,13 +91,20 @@ fi
 rm -Rf "$SITE_OUTPUT_DIR/apidocs"
 cp -au "$SOURCE_ROOT/java/target/site/apidocs" "$SITE_OUTPUT_DIR/"
 
-CPP_CLIENT_API_SUBDIR="cpp-client-api"
-rm -Rf "$SITE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
-cp -a "$SOURCE_ROOT/docs/doxygen/client_api/html" "$SITE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
+if [ -n "$OPT_DOXYGEN" ]; then
+  CPP_CLIENT_API_SUBDIR="cpp-client-api"
+  rm -Rf "$SITE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
+  cp -a "$SOURCE_ROOT/docs/doxygen/client_api/html" "$SITE_OUTPUT_DIR/$CPP_CLIENT_API_SUBDIR"
+fi
+
+SITE_SUBDIRS="docs apidocs"
+if [ -n "$OPT_DOXYGEN" ]; then
+  SITE_SUBDIRS="$SITE_SUBDIRS $CPP_CLIENT_API_SUBDIR"
+fi
 
 cd "$SITE_OUTPUT_DIR"
 SITE_ARCHIVE="$SITE_OUTPUT_DIR/website_archive.zip"
-zip -rq "$SITE_ARCHIVE" docs apidocs "$CPP_CLIENT_API_SUBDIR"
+zip -rq "$SITE_ARCHIVE" "$SITE_SUBDIRS"
 
 echo "Generated web site at $SITE_OUTPUT_DIR"
 echo "Docs zip generated at $SITE_ARCHIVE"