加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.sh 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
#!/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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化