1 #!/bin/bash 2 # 3 # Copyright (C) 2014 The Android Open Source Project 4 # 5 # Licensed under the Apache License, Version 2.0 (the "License"); 6 # you may not use this file except in compliance with the License. 7 # You may obtain a copy of the License at 8 # 9 # http://www.apache.org/licenses/LICENSE-2.0 10 # 11 # Unless required by applicable law or agreed to in writing, software 12 # distributed under the License is distributed on an "AS IS" BASIS, 13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 # See the License for the specific language governing permissions and 15 # limitations under the License. 16 # 17 18 # TODO: $ANDROID_BUILD_TOP/prebuilts/clang/host/linux-x86/clang-stable/bin 19 # no longer contains clang on AOSP master. Need a stable way to reach clang 20 # binaries here. 21 22 if [ x"$1" == "x" ]; then 23 echo "Please specify the top-level Piper client directory." 24 exit 1 25 fi 26 27 DOC_DIR="$1/googledata/devsite/site-android/en/guide/topics/renderscript/" 28 if [ ! -d $DOC_DIR ]; then 29 echo "Expecting top-level Piper client directory." 30 exit 2 31 fi 32 33 cd `dirname $0` 34 35 set -e 36 37 mkdir -p test 38 mkdir -p include 39 mkdir -p docs 40 mkdir -p slangtest 41 42 # The order of the arguments passed to generator matter because: 43 # 1. The overview is expected to be in the first file. 44 # 2. The order specified will be the order they will show in the guide_toc.cs snippet. 45 # This can be manually changed when cut&pasting the snippet into guide_toc.cs. 46 # 3. rsIs/Clear/SetObject is documented in rs_object_info but also found in rs_graphics. 47 # The latter must appear after the former. 48 $ANDROID_HOST_OUT/bin/rs-api-doc-generator rs_core.spec rs_value_types.spec rs_object_types.spec rs_convert.spec rs_math.spec rs_vector_math.spec rs_matrix.spec rs_quaternion.spec rs_atomic.spec rs_time.spec rs_allocation_create.spec rs_allocation_data.spec rs_object_info.spec rs_for_each.spec rs_io.spec rs_debug.spec rs_graphics.spec 49 50 rm -f ../../../cts/tests/tests/renderscript/src/android/renderscript/cts/generated/* 51 mv test/* ../../../cts/tests/tests/renderscript/src/android/renderscript/cts/generated/ 52 rmdir test 53 54 rm -f "$DOC_DIR"/reference/*.html 55 mv docs/*.html "$DOC_DIR"/reference 56 57 # Current API level : 24 58 RS_API_LEVEL=24 59 60 for ((i=11; i<=RS_API_LEVEL; i++)) 61 do 62 mv slangtest/all$i.rs ../../compile/slang/tests/P_all_api_$i 63 done 64 rm -rf slangtest 65 66 mv RSStubsWhiteList.cpp ../../compile/libbcc/lib/ 67 68