Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 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 | |
Jean-Luc Brouillet | 2a85b6b | 2017-01-08 17:35:31 -0800 | [diff] [blame] | 18 | CLANG=$ANDROID_BUILD_TOP/prebuilts/clang/host/linux-x86/clang-stable/bin/clang++ |
Jean-Luc Brouillet | 3609067 | 2015-04-07 15:15:53 -0700 | [diff] [blame] | 19 | |
Jean-Luc Brouillet | bcd5b9a | 2014-03-07 18:00:57 -0800 | [diff] [blame] | 20 | set -e |
Jean-Luc Brouillet | 3609067 | 2015-04-07 15:15:53 -0700 | [diff] [blame] | 21 | $CLANG Generator.cpp Specification.cpp GenerateDocumentation.cpp GenerateHeaderFiles.cpp GenerateTestFiles.cpp Scanner.cpp Utilities.cpp GenerateStubsWhiteList.cpp -g -std=c++11 -Wall -o generator |
Jean-Luc Brouillet | c5184e2 | 2015-03-13 13:51:24 -0700 | [diff] [blame] | 22 | |
Jean-Luc Brouillet | 62e0993 | 2015-03-22 11:14:07 -0700 | [diff] [blame] | 23 | mkdir -p test |
Jean-Luc Brouillet | 2a85b6b | 2017-01-08 17:35:31 -0800 | [diff] [blame] | 24 | mkdir -p include |
Jean-Luc Brouillet | 2217eb7 | 2015-04-24 14:41:48 -0700 | [diff] [blame] | 25 | mkdir -p docs |
Jean-Luc Brouillet | 3609067 | 2015-04-07 15:15:53 -0700 | [diff] [blame] | 26 | mkdir -p slangtest |
Jean-Luc Brouillet | 62e0993 | 2015-03-22 11:14:07 -0700 | [diff] [blame] | 27 | |
Jean-Luc Brouillet | 2217eb7 | 2015-04-24 14:41:48 -0700 | [diff] [blame] | 28 | # The order of the arguments passed to generator matter because: |
| 29 | # 1. The overview is expected to be in the first file. |
| 30 | # 2. The order specified will be the order they will show in the guide_toc.cs snippet. |
| 31 | # This can be manually changed when cut&pasting the snippet into guide_toc.cs. |
| 32 | # 3. rsIs/Clear/SetObject is documented in rs_object_info but also found in rs_graphics. |
| 33 | # The latter must appear after the former. |
Pirama Arumuga Nainar | b4b74af | 2015-10-12 14:38:37 -0700 | [diff] [blame] | 34 | ./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 |
Jean-Luc Brouillet | 2217eb7 | 2015-04-24 14:41:48 -0700 | [diff] [blame] | 35 | |
| 36 | rm generator |
Jean-Luc Brouillet | c5184e2 | 2015-03-13 13:51:24 -0700 | [diff] [blame] | 37 | |
Jean-Luc Brouillet | 62e0993 | 2015-03-22 11:14:07 -0700 | [diff] [blame] | 38 | rm -f ../../../cts/tests/tests/renderscript/src/android/renderscript/cts/generated/* |
| 39 | mv test/* ../../../cts/tests/tests/renderscript/src/android/renderscript/cts/generated/ |
| 40 | rmdir test |
Jean-Luc Brouillet | c5184e2 | 2015-03-13 13:51:24 -0700 | [diff] [blame] | 41 | |
Jean-Luc Brouillet | 2217eb7 | 2015-04-24 14:41:48 -0700 | [diff] [blame] | 42 | rm -f ../../base/docs/html/guide/topics/renderscript/reference/*.jd |
| 43 | mv docs/*.jd ../../base/docs/html/guide/topics/renderscript/reference/ |
Jean-Luc Brouillet | 3609067 | 2015-04-07 15:15:53 -0700 | [diff] [blame] | 44 | |
Miao Wang | 30b1d0e | 2016-02-01 15:32:39 -0800 | [diff] [blame] | 45 | # Current API level : 24 |
| 46 | RS_API_LEVEL=24 |
Miao Wang | 30b1d0e | 2016-02-01 15:32:39 -0800 | [diff] [blame] | 47 | |
| 48 | for ((i=11; i<=RS_API_LEVEL; i++)) |
Jean-Luc Brouillet | 3609067 | 2015-04-07 15:15:53 -0700 | [diff] [blame] | 49 | do |
| 50 | mv slangtest/all$i.rs ../../compile/slang/tests/P_all_api_$i |
| 51 | done |
Yang Ni | 12398d8 | 2015-09-18 14:57:07 -0700 | [diff] [blame] | 52 | rm -rf slangtest |
Jean-Luc Brouillet | 3609067 | 2015-04-07 15:15:53 -0700 | [diff] [blame] | 53 | |
| 54 | mv RSStubsWhiteList.cpp ../../compile/libbcc/lib/Renderscript/ |
| 55 | |
Jean-Luc Brouillet | 2217eb7 | 2015-04-24 14:41:48 -0700 | [diff] [blame] | 56 | echo "Be sure to update platform/frameworks/base/docs/html/guide/guide_toc.cs if needed." |