代码拉取完成,页面将自动刷新
#!/bin/bash
# The entrance of the build Compiler toolchain
set -e
readonly LOG_PATH="$PWD/logs"
readonly OPEN_SOURCE_PATH="$PWD/../open_source"
# Check if the build tool exists, Build error when missing tools
miss_tool_error()
{
$1 $2
if [ $? -ne 0 ]; then
echo "##################################"
echo "# ERROR: $1 is not found!! # "
echo "##################################"
exit 1
else
echo "$1 checked success!!"
fi
}
#Clear history build legacy files.
#All build logs
#The intermediate file is placed in the directory name with the "_build_dir" keyword.
#The Source code is placed in the directory name with the "_build_src" keyword.
clean()
{
for file in $(find $OPEN_SOURCE_PATH -name "*_build_src")
do
[ -n "$file" ] && rm -rf $file
done
for file in $(find . -name "*_build_dir")
do
[ -n "$file" ] && rm -rf $file
done
[ -n "$PWD/../output" ] && rm -rf $PWD/../output/*
[ -n "$LOG_PATH" ] && rm -rf $LOG_PATH
}
echo "$(date +"%Y-%m-%d %H:%M:%S") ========begin building ========"
source $PWD/config.xml
miss_tool_error gcc --version
miss_tool_error g++ --version
miss_tool_error bison --version
miss_tool_error flex --version
miss_tool_error makeinfo --version
if [ "$1"x = "gcc_arm64le"x ] || [ "$1"x = "gcc_arm32le"x ]; then
cd $1
elif [ "$1"x = "clean"x ] ; then
clean
exit 0
else
echo Using "sh build.sh xxx" to build the toolchain. xxx is the toolchain name
echo Using "sh build.sh clean" to clear history build legacy files
exit 0
fi
bash build.sh
cd -
exit 0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。