From 947c78887e791596d4a5ec2d1079f8b1a049628b Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Tue, 27 Oct 2020 11:16:21 +0900 Subject: basesystem 0.1 --- .../task_manager/client/ss_data_init/mkdatainit.sh | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 systemservice/task_manager/client/ss_data_init/mkdatainit.sh (limited to 'systemservice/task_manager/client/ss_data_init/mkdatainit.sh') diff --git a/systemservice/task_manager/client/ss_data_init/mkdatainit.sh b/systemservice/task_manager/client/ss_data_init/mkdatainit.sh new file mode 100644 index 00000000..802fbd93 --- /dev/null +++ b/systemservice/task_manager/client/ss_data_init/mkdatainit.sh @@ -0,0 +1,45 @@ +#!/bin/bash + +# +# Copyright (c) 2019-2020 TOYOTA MOTOR CORPORATION +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +cp tskm_data_init.cpp.in tskm_data_init.cpp.tmp + +LF=$(printf '\\\012_') +LF=${LF%_} + +for files in `ls obj/*.os` +do + serviceName=`nm -C $files | grep " T " | grep -o "tskm_[0-9a-zA-Z_]\+_data_init" | sed -e "s/^tskm_//" | sed -e "s/_data_init\$//"` + + funcname="tskm_"$serviceName"_data_init" + + echo $serviceName $funcname + sed -i "s/@DATA_INIT_PROT@/EFrameworkunifiedStatus $funcname(T_SS_SM_START_DataStructType* );$LF@DATA_INIT_PROT@/g" tskm_data_init.cpp.tmp + sed -i "s/@DATA_INIT_TABLE@/{\"$serviceName\", $funcname},$LF @DATA_INIT_TABLE@/g" tskm_data_init.cpp.tmp + +done + +sed -i "s/@DATA_INIT_PROT@//g" tskm_data_init.cpp.tmp +sed "s/@DATA_INIT_TABLE@/{NULL , NULL},/g" tskm_data_init.cpp.tmp > tskm_data_init.cpp + +rm tskm_data_init.cpp.tmp + + + + + + -- cgit 1.2.3-korg