[IOT-1179] Adding rt and if into response of Get request to doxm and pstat
[platform/upstream/iotivity.git] / build_docs.sh
1 #!/bin/bash
2
3 # Fail script on any failure
4 set -e
5
6 # Move to script direotory
7 pushd `dirname $0` > /dev/null
8
9 rm -rf docs
10
11 # JavaDoc now... from Uze's script
12 ANDROID_JAR="$ANDROID_HOME/platforms/android-21/android.jar"
13
14 if [ ! -e "$ANDROID_JAR" ]; then
15     echo "Android platform not found. Expected '$ANDROID_JAR'"
16     exit 1
17 fi
18
19 BASE_PATH="android/android_api/base/src/main/java/"
20 BASE_PKG="org.iotivity.base"
21
22 TM_PATH="service/things-manager/sdk/java/src/"
23 TM_PKG="org.iotivity.service.tm"
24
25 SSM_PATH="service/soft-sensor-manager/SDK/java/"
26 SSM_PKG="org.iotivity.service.ssm"
27
28 PPM_PATH="service/protocol-plugin/plugin-manager/src/Android/src"
29 PPM_PKG="service/protocol-plugin/plugin-manager/src/Android/src/org/iotivity/service/ppm/PluginManager.java service/protocol-plugin/plugin-manager/src/Android/src/org/iotivity/service/ppm/Plugin.java"
30 # PPM_PKG="org.iotivity.service.ppm"
31
32 javadoc -splitindex \
33         -d ./docs/java \
34         -sourcepath $BASE_PATH:$TM_PATH:$SSM_PATH $BASE_PKG $TM_PKG $SSM_PKG $PPM_PKG \
35         -classpath $ANDROID_JAR
36
37 # Doxygen now...
38 # NOTE: For now this is a workaround since I am ready to modify the doxygen setup
39 pushd resource/docs > /dev/null
40 doxygen
41
42 # Check for warnings or errors
43 if [ -s doxygen.log ]; then
44     echo "Errors running doxygen. Review doxygen.log"
45     exit 2
46 fi
47
48 popd > /dev/null
49 rm -rf docs/cxx
50 mv resource/docs/docs/html docs/cxx
51
52 popd > /dev/null